diff --git a/mateamt.cabal b/mateamt.cabal index d0b3fe6..ce4bd40 100644 --- a/mateamt.cabal +++ b/mateamt.cabal @@ -168,32 +168,32 @@ executable mateamt default-language: Haskell2010 ghc-options: -Wall -test-suite mateamt-test - default-language: Haskell2010 - type: exitcode-stdio-1.0 - hs-source-dirs: test - ghc-options: -Wall - main-is: TestMain.hs - build-depends: - base >=4.14.1.0 - , mateamt - , text >=1.2.4.1 - , time >=1.9.3 - , mtl >=2.2.2 - , containers >=0.6.2.1 - , bytestring >=0.10.12.0 - , hspec - , hspec-wai - , hspec-wai-json - , warp - , wai - , pg-transact - , tmp-postgres - , resource-pool - , postgresql-simple - build-tool-depends: - hspec-discover:hspec-discover == 2.* - other-modules: - Spec - TestUtil - AppMainSpec +-- test-suite mateamt-test +-- default-language: Haskell2010 +-- type: exitcode-stdio-1.0 +-- hs-source-dirs: test +-- ghc-options: -Wall +-- main-is: TestMain.hs +-- build-depends: +-- base >=4.14.1.0 +-- , mateamt +-- , text >=1.2.4.1 +-- , time >=1.9.3 +-- , mtl >=2.2.2 +-- , containers >=0.6.2.1 +-- , bytestring >=0.10.12.0 +-- , hspec +-- , hspec-wai +-- , hspec-wai-json +-- , warp +-- , wai +-- , pg-transact +-- , tmp-postgres +-- , resource-pool +-- , postgresql-simple +-- build-tool-depends: +-- hspec-discover:hspec-discover == 2.* +-- other-modules: +-- Spec +-- TestUtil +-- AppMainSpec diff --git a/test/AppMainSpec.hs b/test/AppMainSpec.hs index 61b1114..0dcf881 100644 --- a/test/AppMainSpec.hs +++ b/test/AppMainSpec.hs @@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE PackageImports #-} module AppMainSpec where import Database.PostgreSQL.Transact @@ -10,11 +9,11 @@ import Control.Monad.IO.Class (liftIO) -- internal imports -import qualified "mateamt" Util as LibUtil +import Util import TestUtil spec :: Spec spec = describeDB (const $ return ()) "Initialize DB" $ - itDB "call initialization script" $ do + itDB "calls initialization script" $ do conn <- getConnection - liftIO $ shouldReturn (LibUtil.initDB conn) () + liftIO $ shouldReturn (initDB conn) () diff --git a/test/TestMain.hs b/test/TestMain.hs index 6e7666c..ef6fe64 100644 --- a/test/TestMain.hs +++ b/test/TestMain.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE PackageImports #-} module Main where import Test.Hspec