MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestCmdUpdateProjectPriority

Function TestCmdUpdateProjectPriority

internal/app/update_test.go:330–345  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

328}
329
330func TestCmdUpdateProjectPriority(t *testing.T) {
331 setupFlowRoot(t)
332 wd := t.TempDir()
333 if rc := cmdAdd([]string{"project", "Some Proj", "--slug", "up-sp", "--work-dir", wd}); rc != 0 {
334 t.Fatalf("seed project rc=%d", rc)
335 }
336
337 if rc := cmdUpdate([]string{"project", "up-sp", "--priority", "low"}); rc != 0 {
338 t.Fatalf("rc=%d", rc)
339 }
340 db := openFlowDB(t)
341 p, _ := flowdb.GetProject(db, "up-sp")
342 if p.Priority != "low" {
343 t.Errorf("project priority = %q, want low", p.Priority)
344 }
345}
346
347func TestCmdUpdateProjectPriorityInvalid(t *testing.T) {
348 setupFlowRoot(t)

Callers

nothing calls this directly

Calls 5

GetProjectFunction · 0.92
setupFlowRootFunction · 0.85
cmdAddFunction · 0.85
cmdUpdateFunction · 0.85
openFlowDBFunction · 0.85

Tested by

no test coverage detected