on dev help sign in
fix
1aeda35Eitan Chatav
squeel-postgresql/test/Squeel/PostgreSQL/StatementSpec.hs+2−2
@@ -25,7 +25,7 @@ spec = do
25 statement :: Statement '[] SumAndCol1 Tables Tables
25 statement :: Statement '[] SumAndCol1 Tables Tables
26 statement = select $
26 statement = select $
27 ((#col1 + #col2) `As` #sum :* #col1 :* Nil)
27 ((#col1 + #col2) `As` #sum :* #col1 :* Nil)
28− `from` (#table1 & where_ ((#col1 :: Expression '[] Tables ('Required ('NotNull 'PGInt4)))>* #col2))
28+ `from` (#table1 & where_ ((#col1 :: Expression '[] Tables ('Required ('NotNull 'PGInt4))) >* #col2))
29 statement `shouldRenderAs`
29 statement `shouldRenderAs`
30 "SELECT (col1 + col2) AS sum, col1 AS col1 FROM table1 AS table1 WHERE (col1 > col2);"
30 "SELECT (col1 + col2) AS sum, col1 AS col1 FROM table1 AS table1 WHERE (col1 > col2);"
31 it "combines WHEREs using AND" $ do
31 it "combines WHEREs using AND" $ do
@@ -93,7 +93,7 @@ spec = do
93 it "correctly renders DELETEs" $ do
93 it "correctly renders DELETEs" $ do
94 let
94 let
95 statement :: Statement '[] '[] Tables Tables
95 statement :: Statement '[] '[] Tables Tables
96− statement = delete #table1 ((#col1 :: Expression '[] Tables ('Required ('NotNull 'PGInt4))) ==* #col2)
96+ statement = deleteFrom #table1 ((#col1 :: Expression '[] Tables ('Required ('NotNull 'PGInt4))) ==* #col2)
97 statement `shouldRenderAs`
97 statement `shouldRenderAs`
98 "DELETE FROM table1 WHERE (col1 = col2);"
98 "DELETE FROM table1 WHERE (col1 = col2);"
99 it "should be safe against SQL injection in literal text" $ do
99 it "should be safe against SQL injection in literal text" $ do