Test AssertColumns with invalid SQL
(t *testing.T)
| 314 | |
| 315 | // Test AssertColumns with invalid SQL |
| 316 | func TestAssertColumns_InvalidSQL(t *testing.T) { |
| 317 | mockT := &mockTestingT{} |
| 318 | |
| 319 | result := AssertColumns(mockT, "SELECT FROM WHERE", []string{"id"}) |
| 320 | |
| 321 | if result { |
| 322 | t.Error("AssertColumns should return false for invalid SQL") |
| 323 | } |
| 324 | if !mockT.failed { |
| 325 | t.Error("AssertColumns should fail for invalid SQL") |
| 326 | } |
| 327 | if !strings.Contains(mockT.errorMsg, "Failed to parse SQL") { |
| 328 | t.Errorf("Error message should indicate parse failure, got: %s", mockT.errorMsg) |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | // Test AssertParsesTo with correct type |
| 333 | func TestAssertParsesTo_Correct(t *testing.T) { |
nothing calls this directly
no test coverage detected