(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func TestLoadState_NonexistentFile(t *testing.T) { |
| 9 | dir := t.TempDir() |
| 10 | |
| 11 | state, err := LoadState(dir, "github") |
| 12 | if err != nil { |
| 13 | t.Fatalf("unexpected error: %v", err) |
| 14 | } |
| 15 | |
| 16 | if state.Source != "github" { |
| 17 | t.Errorf("expected source=github, got %q", state.Source) |
| 18 | } |
| 19 | if len(state.Tasks) != 0 { |
| 20 | t.Errorf("expected empty tasks map, got %d entries", len(state.Tasks)) |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | func TestState_SaveAndLoadRoundtrip(t *testing.T) { |
| 25 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected