aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/Crypto/Macaroon/Serializer/Base64/Tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Crypto/Macaroon/Serializer/Base64/Tests.hs')
-rw-r--r--test/Crypto/Macaroon/Serializer/Base64/Tests.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Crypto/Macaroon/Serializer/Base64/Tests.hs b/test/Crypto/Macaroon/Serializer/Base64/Tests.hs
index 9c49e96..fe5352e 100644
--- a/test/Crypto/Macaroon/Serializer/Base64/Tests.hs
+++ b/test/Crypto/Macaroon/Serializer/Base64/Tests.hs
@@ -15,17 +15,23 @@ module Crypto.Macaroon.Serializer.Base64.Tests where
15import qualified Data.ByteString.Char8 as B8 15import qualified Data.ByteString.Char8 as B8
16import Test.Tasty 16import Test.Tasty
17import Test.Tasty.HUnit 17import Test.Tasty.HUnit
18import Test.Tasty.QuickCheck
18 19
19import Crypto.Macaroon 20import Crypto.Macaroon
20import Crypto.Macaroon.Serializer.Base64 21import Crypto.Macaroon.Serializer.Base64
21 22
23import Crypto.Macaroon.Instances
24
22tests :: TestTree 25tests :: TestTree
23tests = testGroup "Crypto.Macaroon.Serializer.Base64" [ basic 26tests = testGroup "Crypto.Macaroon.Serializer.Base64" [ basic
27 , basicQC
24 , minted 28 , minted
25 , minted2 29 , minted2
26 -- , minted3 30 -- , minted3
27 ] 31 ]
28 32
33basicQC = testProperty "Reversibility" $
34 forAll (macaroon <$> arbitrary) (\m -> deserialize (serialize m) == Right m)
29 35
30m :: Macaroon 36m :: Macaroon
31m = create secret key loc 37m = create secret key loc