(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func TestRemoveColumn_SingleColumn(t *testing.T) { |
| 79 | stmt := mustParse(t, "SELECT id, name FROM users") |
| 80 | err := Apply(stmt, RemoveColumn("id")) |
| 81 | if err != nil { |
| 82 | t.Fatal(err) |
| 83 | } |
| 84 | out := format(stmt) |
| 85 | assertNotContains(t, out, "id") |
| 86 | assertContains(t, out, "name") |
| 87 | } |
| 88 | |
| 89 | func TestColumns_UnsupportedStatement(t *testing.T) { |
| 90 | stmt := mustParse(t, "UPDATE users SET name = 'bob'") |
nothing calls this directly
no test coverage detected