(t *testing.T)
| 304 | } |
| 305 | |
| 306 | func TestLintSQLInternal_CleanSQL(t *testing.T) { |
| 307 | data, err := lintSQLInternal("SELECT id FROM users") |
| 308 | if err != nil { |
| 309 | t.Fatalf("unexpected error: %v", err) |
| 310 | } |
| 311 | if _, ok := data["violation_count"]; !ok { |
| 312 | t.Error("expected violation_count key") |
| 313 | } |
| 314 | if _, ok := data["violations"]; !ok { |
| 315 | t.Error("expected violations key") |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | func TestLintSQLInternal_WithViolations(t *testing.T) { |
| 320 | data, err := lintSQLInternal("select id from users \n") |
nothing calls this directly
no test coverage detected