(t *testing.T)
| 443 | } |
| 444 | |
| 445 | func TestManagerSetConfig(t *testing.T) { |
| 446 | m := NewManager(10, testProvider) |
| 447 | |
| 448 | // Initially nil |
| 449 | if m.Config() != nil { |
| 450 | t.Error("expected nil config initially") |
| 451 | } |
| 452 | |
| 453 | // Set config |
| 454 | cfg := &config.Config{ |
| 455 | OnComplete: config.OnCompleteConfig{ |
| 456 | Push: true, |
| 457 | CreatePR: true, |
| 458 | }, |
| 459 | } |
| 460 | m.SetConfig(cfg) |
| 461 | |
| 462 | got := m.Config() |
| 463 | if got == nil { |
| 464 | t.Fatal("expected non-nil config") |
| 465 | } |
| 466 | if !got.OnComplete.Push { |
| 467 | t.Error("expected OnComplete.Push to be true") |
| 468 | } |
| 469 | if !got.OnComplete.CreatePR { |
| 470 | t.Error("expected OnComplete.CreatePR to be true") |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | func TestManagerSetPostCompleteCallback(t *testing.T) { |
| 475 | m := NewManager(10, testProvider) |
nothing calls this directly
no test coverage detected