(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func TestAddWhere_NewCondition(t *testing.T) { |
| 55 | stmt := mustParse(t, "SELECT id, name FROM users") |
| 56 | err := Apply(stmt, AddWhereFromSQL("active = true")) |
| 57 | if err != nil { |
| 58 | t.Fatal(err) |
| 59 | } |
| 60 | out := format(stmt) |
| 61 | assertContains(t, out, "WHERE") |
| 62 | assertContains(t, out, "active") |
| 63 | } |
| 64 | |
| 65 | func TestAddWhere_ExistingCondition(t *testing.T) { |
| 66 | stmt := mustParse(t, "SELECT * FROM users WHERE age > 18") |
nothing calls this directly
no test coverage detected