@@ -55,10 +55,9 @@ spec = do
55 `shouldBe`
55 `shouldBe`
56 "INSERT INTO table1 (col1, col2) VALUES (2, 4);"
56 "INSERT INTO table1 (col1, col2) VALUES (2, 4);"
57 it "should be safe against SQL injection in literal text" $ do
57 it "should be safe against SQL injection in literal text" $ do
58− pendingWith "gotta find an escape function"
59− -- renderQuery (select (literalText `from` table1))
58+ renderQuery (select (literalText `from` table1))
60− -- `shouldBe`
59+ `shouldBe`
61− -- "SELECT '\\'DROP TABLE table1;' AS literal FROM table1;"
60+ "SELECT E''';DROP TABLE table1;' AS literal FROM table1;"
63type Columns = '[ '("col1", 'PGInt4), '("col2", 'PGInt4)]
62type Columns = '[ '("col1", 'PGInt4), '("col2", 'PGInt4)]
64type Tables = '[ '("table1", Columns)]
63type Tables = '[ '("table1", Columns)]