MCPcopy Create free account
hub / github.com/moncho/dry / TestModel_ContainersLoadedMsg

Function TestModel_ContainersLoadedMsg

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

Source from the content-addressed store, hash-verified

1078}
1079
1080func TestModel_ContainersLoadedMsg(t *testing.T) {
1081 m := newTestModel()
1082 containers := m.daemon.Containers(nil, 0)
1083
1084 result, _ := m.Update(containersLoadedMsg{containers: containers})
1085 m = result.(model)
1086
1087 if m.containers.SelectedContainer() == nil {
1088 t.Fatal("expected containers to be loaded and selectable")
1089 }
1090}
1091
1092func TestModel_OperationSuccessMsg(t *testing.T) {
1093 m := newTestModel()

Callers

nothing calls this directly

Calls 4

newTestModelFunction · 0.85
SelectedContainerMethod · 0.80
ContainersMethod · 0.65
UpdateMethod · 0.45

Tested by

no test coverage detected