Permalink
Browse files

[220] Correcting erroneous tests in wallet suite

  • Loading branch information...
paweljakubas committed Feb 9, 2019
1 parent 7a68821 commit 100045f7e61be31e8a1e627485e92a8852c90717
Showing with 8 additions and 8 deletions.
  1. +8 −8 test/integration/Test/Integration/Scenario/Wallets.hs
@@ -188,7 +188,7 @@ spec = do
, [ expectSuccess
, expectListSizeEqual 2
, expectListItemFieldEqual 0 amount 3
, expectListItemFieldEqual 1 amount 0
, expectListItemFieldEqual 1 amount 1
]
)
, ( "api/v1/wallets?balance=GT%5B6%5D"
@@ -210,30 +210,30 @@ spec = do
, expectListSizeEqual 4
, expectListItemFieldEqual 0 amount 6
, expectListItemFieldEqual 1 amount 6
, expectListItemFieldEqual 2 amount 6
, expectListItemFieldEqual 3 amount 0
, expectListItemFieldEqual 2 amount 3
, expectListItemFieldEqual 3 amount 1
]
)
, ( "api/v1/wallets?balance=RANGE%5B6%3,6D&sort_by=balance"
, ( "api/v1/wallets?balance=RANGE%5B3,6%5D&sort_by=balance"
, [ expectSuccess
, expectListSizeEqual 3
, expectListItemFieldEqual 0 amount 6
, expectListItemFieldEqual 1 amount 6
, expectListItemFieldEqual 2 amount 3
]
)
, ( "api/v1/wallets?balance=RANGE%5B6%3,0,9D&sort_by=balance"
, ( "api/v1/wallets?balance=RANGE%5B6,9%5D&sort_by=balance"
, [ expectSuccess
, expectListSizeEqual 3
, expectListItemFieldEqual 0 amount 9
, expectListItemFieldEqual 1 amount 3
, expectListItemFieldEqual 2 amount 0
, expectListItemFieldEqual 1 amount 6
, expectListItemFieldEqual 2 amount 6
]
)
]

forM_ matrix $ \(endpoint, expectations) -> scenario endpoint $ do
forM_ ([3,6,6,9]) $ \coins -> do
forM_ ([3,6,6,9,1]) $ \coins -> do
setup $ defaultSetup
& initialCoins .~ [coins]

0 comments on commit 100045f

Please sign in to comment.