Test AssertFormattedSQL with invalid SQL
(t *testing.T)
| 172 | |
| 173 | // Test AssertFormattedSQL with invalid SQL |
| 174 | func TestAssertFormattedSQL_InvalidSQL(t *testing.T) { |
| 175 | mockT := &mockTestingT{} |
| 176 | |
| 177 | result := AssertFormattedSQL(mockT, "SELECT FROM WHERE", "anything") |
| 178 | |
| 179 | if result { |
| 180 | t.Error("AssertFormattedSQL should return false for invalid SQL") |
| 181 | } |
| 182 | if !mockT.failed { |
| 183 | t.Error("AssertFormattedSQL should fail for invalid SQL") |
| 184 | } |
| 185 | if !strings.Contains(mockT.errorMsg, "Failed to format SQL") { |
| 186 | t.Errorf("Error message should indicate format failure, got: %s", mockT.errorMsg) |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | // Test AssertTables with correct tables |
| 191 | func TestAssertTables_Correct(t *testing.T) { |
nothing calls this directly
no test coverage detected