(t *testing.T)
| 15 | ) |
| 16 | |
| 17 | func TestIntegrateCmd_CommandStructure(t *testing.T) { |
| 18 | // Cleanup. |
| 19 | dirs.RemoveAllForTest() |
| 20 | |
| 21 | // Test command creation. |
| 22 | integrate := &integrateCmd{} |
| 23 | celer := &configs.Celer{} |
| 24 | |
| 25 | cmd := integrate.Command(celer) |
| 26 | |
| 27 | if cmd.Use != "integrate" { |
| 28 | t.Errorf("Expected Use to be 'integrate', got %s", cmd.Use) |
| 29 | } |
| 30 | |
| 31 | if cmd.Short == "" { |
| 32 | t.Error("Short description should not be empty") |
| 33 | } |
| 34 | |
| 35 | if cmd.Long == "" { |
| 36 | t.Error("Long description should not be empty") |
| 37 | } |
| 38 | |
| 39 | // Test flags |
| 40 | flag := cmd.Flags().Lookup("remove") |
| 41 | if flag == nil { |
| 42 | t.Error("--remove flag should be defined") |
| 43 | return |
| 44 | } |
| 45 | |
| 46 | if flag.DefValue != "false" { |
| 47 | t.Errorf("Expected --remove default to be false, got %s", flag.DefValue) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | func TestIntegrateCmd_Completion(t *testing.T) { |
| 52 | // Cleanup. |
nothing calls this directly
no test coverage detected