on dev help sign in
tests
commit7477c38fd98317a425d82a42b3c2c0c0e6b4ed1d authorEitan Chatav <eitan.chatav@gmail.com> dateMon 26 Jun 2017, 17:36 (9 years ago) parentc8d6bbd
1 file changed+13−8
squeel-postgresql/test/Squeel/PostgreSQL/StatementSpec.hs+13−8
squeel-postgresql/test/Squeel/PostgreSQL/StatementSpec.hs+13−8
@@ -132,15 +132,20 @@ spec = do
132132 "SELECT orders1.*\
133133 \ FROM orders AS orders1\
134134 \ CROSS JOIN orders AS orders2;"
135− it "should render simple CREATE TABLE statements" $ do
136− let
137− statement :: Statement '[] '[] '[] Tables
138− statement = createTable #table1
139− ( (int4 & notNull) `As` #col1
140− :& (int4 & notNull) `As` #col2
141− :& RNil)
142− statement `shouldRenderAs`
135+ it "should render CREATE TABLE statements" $ do
136+ createTable #table1
137+ ( (int4 & notNull) `As` #col1
138+ :& (int4 & notNull) `As` #col2
139+ :& RNil)
140+ `shouldRenderAs`
143141 "CREATE TABLE table1 (col1 int4 NOT NULL, col2 int4 NOT NULL);"
142+ createTable #table2
143+ ( serial `As` #col1
144+ :& text `As` #col2
145+ :& (int8 & notNull & default_ 8) `As` #col3
146+ :& RNil)
147+ `shouldRenderAs`
148+ "CREATE TABLE table2 (col1 serial, col2 text, col3 int8 NOT NULL DEFAULT 8);"
144149 it "should render DROP TABLE statements" $ do
145150 let
146151 statement :: Statement '[] '[] Tables '[]