(t *testing.T)
| 328 | } |
| 329 | |
| 330 | func 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 | |
| 347 | func TestCmdUpdateProjectPriorityInvalid(t *testing.T) { |
| 348 | setupFlowRoot(t) |
nothing calls this directly
no test coverage detected