MCPcopy
hub / github.com/moncho/dry / TestModel_WorkspaceContextEmptyMessageTracksView

Function TestModel_WorkspaceContextEmptyMessageTracksView

app/model_test.go:1021–1033  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1019}
1020
1021func TestModel_WorkspaceContextEmptyMessageTracksView(t *testing.T) {
1022 m := newWorkspaceTestModel()
1023 m.view = Images
1024 m.images.SetImages(nil)
1025
1026 body := m.renderWorkspaceBody()
1027 if !strings.Contains(body, "Select an image to preview it here.") {
1028 t.Fatalf("expected image-specific empty message, got %q", body)
1029 }
1030 if strings.Contains(body, "Select a container or Compose resource to preview it here.") {
1031 t.Fatal("did not expect the old generic container/Compose empty message")
1032 }
1033}
1034
1035func TestModel_WorkspaceSwitchViewResetsActivity(t *testing.T) {
1036 m := newWorkspaceTestModel()

Callers

nothing calls this directly

Calls 4

newWorkspaceTestModelFunction · 0.85
SetImagesMethod · 0.80
renderWorkspaceBodyMethod · 0.80
ContainsMethod · 0.80

Tested by

no test coverage detected