Skip to content

Commit

Permalink
[69] Use property in WalletLayerSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Mar 21, 2019
1 parent bdc5c9c commit 5930605
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/unit/Cardano/DBLayer/MVarSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ deriving instance Show (PrimaryKey WalletId)
instance Arbitrary (PrimaryKey WalletId) where
-- No shrinking
arbitrary = do
fiftyInts <- vectorOf 10 $ choose (0 :: Int, 9)
let key = (T.pack . show) fiftyInts
nums <- vectorOf 10 $ choose (0 :: Int, 9)
let key = (T.pack . show) nums
fmap PrimaryKey $ WalletId <$> pure key

toWalletState
Expand Down
10 changes: 5 additions & 5 deletions test/unit/Cardano/WalletLayerSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ import Test.QuickCheck
, InfiniteList (..)
, Property
, arbitraryBoundedEnum
, checkCoverage
, choose
, property
, vectorOf
)
import Test.QuickCheck.Monadic
Expand All @@ -72,13 +72,13 @@ spec :: Spec
spec = do
describe "WalletLayer works as expected" $ do
it "Wallet upon creation is written down in db"
(checkCoverage walletCreationProp)
(property walletCreationProp)
it "Wallet cannot be created more than once"
(checkCoverage walletDoubleCreationProp)
(property walletDoubleCreationProp)
it "Wallet after being created can be got using valid wallet Id"
(checkCoverage walletGetProp)
(property walletGetProp)
it "Wallet with wrong wallet Id cannot be got"
(checkCoverage walletGetWrongIdProp)
(property walletGetWrongIdProp)


{-------------------------------------------------------------------------------
Expand Down

0 comments on commit 5930605

Please sign in to comment.