Skip to content

Commit

Permalink
Add roundtrip property test for {encode,decode}PoolIdBech32
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Aug 27, 2020
1 parent a58539e commit 433ea9b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/core/test/unit/Cardano/Wallet/Primitive/TypesSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ import Cardano.Wallet.Primitive.Types
, WalletName (..)
, balance
, computeUtxoStatistics
, decodePoolIdBech32
, encodePoolIdBech32
, excluding
, isAfterRange
, isBeforeRange
Expand Down Expand Up @@ -228,6 +230,10 @@ spec = do
toText <$> fromText @(Hash "Account") text
`shouldBe` Right text

it "Can roundtrip {decode,encode}PoolIdBech32" $
withMaxSuccess 1000 $ property $ \(pid :: PoolId) ->
decodePoolIdBech32 (encodePoolIdBech32 pid) === Right pid

describe "Buildable" $ do
it "WalletId" $ do
let mw = someDummyMnemonic (Proxy @12)
Expand Down

0 comments on commit 433ea9b

Please sign in to comment.