Release Please / Release Please (push) Skipped
Tests / Test (Go 1.22) (push) Skipped
Tests / Test (Go stable) (push) Skipped
Release / GoReleaser (push) Failing after 38s
Polish the office TUI with proportional pane layout, drag resize, live filtering, HTML mail preview, paginated mail lists, overflow scrollbars, flattened navigation, and project save/status fixes; add UpdateProjectStatus. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
553 B
Go
24 lines
553 B
Go
package model
|
|
|
|
import "testing"
|
|
|
|
func TestFormFieldsFromRawMail(t *testing.T) {
|
|
raw := map[string]any{"subject": "Hi", "body": "Hello"}
|
|
f := FormFieldsFromRaw(KindMail, raw)
|
|
if f.Primary != "Hi" || f.Secondary != "Hello" || !f.ReadOnly {
|
|
t.Fatalf("unexpected mail fields: %+v", f)
|
|
}
|
|
}
|
|
|
|
func TestIsDocumentKind(t *testing.T) {
|
|
if !IsDocumentKind(KindFile) {
|
|
t.Fatal("file should be document")
|
|
}
|
|
if !IsDocumentKind(KindMail) {
|
|
t.Fatal("mail should be document preview")
|
|
}
|
|
if IsDocumentKind(KindTask) {
|
|
t.Fatal("task should be form")
|
|
}
|
|
}
|