Permalink
Browse files

Verify the client record create logic

  • Loading branch information...
adomokos committed Jan 24, 2018
1 parent 9f7c14e commit be20905a5ad5199c7b7b5e1eb4de8705a3656770
Showing with 11 additions and 3 deletions.
  1. +1 −0 hashmir.cabal
  2. +1 −0 package.yaml
  3. +9 −3 test/Hashmir/DataSpec.hs
@@ -52,6 +52,7 @@ test-suite hashmir-test
, yeshql
, HDBC
, HDBC-mysql
, process
, hashmir
, hspec == 2.*
other-modules:
@@ -32,6 +32,7 @@ tests:
source-dirs: test/
main: Spec.hs
dependencies:
- process
- hashmir
- hspec == 2.*
other-modules:
@@ -1,12 +1,18 @@
module Hashmir.DataSpec where

import Test.Hspec
import System.Process
import qualified Hashmir.Data as D

main :: IO ()
main = hspec spec

resetDB :: IO ()
resetDB = callCommand "make build-db"

spec :: Spec
spec = do
spec = before resetDB $ do
describe "Hashmir Data" $ do
it "runs a test" $ do
True `shouldBe` True
it "creates a Client record" $ do
clientId <- D.insertClient "TestClient" "testclient"
clientId `shouldBe` 1

0 comments on commit be20905

Please sign in to comment.