Test RequireValidSQL with invalid SQL
(t *testing.T)
| 97 | |
| 98 | // Test RequireValidSQL with invalid SQL |
| 99 | func TestRequireValidSQL_Invalid(t *testing.T) { |
| 100 | mockT := &mockTestingT{} |
| 101 | |
| 102 | RequireValidSQL(mockT, "SELECT FROM WHERE") |
| 103 | |
| 104 | if !mockT.fataled { |
| 105 | t.Error("RequireValidSQL should fatal for invalid SQL") |
| 106 | } |
| 107 | if !strings.Contains(mockT.fatalMsg, "Required valid SQL") { |
| 108 | t.Errorf("Fatal message should be descriptive, got: %s", mockT.fatalMsg) |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | // Test RequireInvalidSQL with invalid SQL |
| 113 | func TestRequireInvalidSQL_Invalid(t *testing.T) { |
nothing calls this directly
no test coverage detected