diff --git a/testsrc/TestSbasics.hs b/testsrc/TestSbasics.hs index fc8bf0d..afd069b 100644 --- a/testsrc/TestSbasics.hs +++ b/testsrc/TestSbasics.hs @@ -121,8 +121,7 @@ testWithTransaction = dbTestCase (\dbh -> sFetchAllRows qrysth >>= (assertEqual "initial commit" [[Just "0"]]) -- Let's try a rollback. - try $ withTransaction dbh (\_ -> do sExecuteMany sth rows - fail "Foo") + try $ withTransaction dbh (const $ sExecuteMany sth rows >> fail "Foo") :: IO (Either SomeException a) sExecute qrysth [] sFetchAllRows qrysth >>= (assertEqual "rollback" [[Just "0"]]) diff --git a/testsrc/Testbasics.hs b/testsrc/Testbasics.hs index dc48a28..62f17e9 100644 --- a/testsrc/Testbasics.hs +++ b/testsrc/Testbasics.hs @@ -138,8 +138,7 @@ testWithTransaction = dbTestCase (\dbh -> fetchAllRows qrysth >>= (assertEqual "initial commit" [[toSql "0"]]) -- Let's try a rollback. - try $ withTransaction dbh (\_ -> do executeMany sth rows - fail "Foo") + try $ withTransaction dbh (const $ executeMany sth rows >> fail "Foo") :: IO (Either SomeException a) execute qrysth [] fetchAllRows qrysth >>= (assertEqual "rollback" [[SqlString "0"]])