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>
27 lines
621 B
Go
27 lines
621 B
Go
package model_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/eslider/go-onlyoffice/cmd/office/model"
|
|
)
|
|
|
|
func TestProjectStatusFromInt(t *testing.T) {
|
|
if got := model.ProjectStatusFromAny(2); got != model.ProjectLifecycleClosed {
|
|
t.Fatalf("got %q", got)
|
|
}
|
|
if got := model.ProjectStatusFromAny(0); got != model.ProjectLifecycleOpen {
|
|
t.Fatalf("got %q", got)
|
|
}
|
|
}
|
|
|
|
func TestProjectStatusToggle(t *testing.T) {
|
|
s := model.ProjectLifecycleOpen
|
|
if s.Next() != model.ProjectLifecycleClosed {
|
|
t.Fatal("expected closed")
|
|
}
|
|
if s.Next().Prev() != model.ProjectLifecycleOpen {
|
|
t.Fatal("expected open after toggle back")
|
|
}
|
|
}
|