]>
Commit | Line | Data |
---|---|---|
86f38823 JT |
1 | {-# LANGUAGE OverloadedStrings #-} |
2 | {-| | |
3 | Copyright : (c) 2015 Julien Tanguy | |
4 | License : BSD3 | |
5 | ||
6 | Maintainer : julien.tanguy@jhome.fr | |
7 | ||
8 | ||
9 | This test suite is based on the pymacaroons test suite: | |
10 | <https://github.com/ecordell/pymacaroons> | |
11 | -} | |
12 | module Crypto.Macaroon.Verifier.Internal.Tests where | |
13 | ||
14 | import qualified Data.ByteString.Char8 as B8 | |
15 | import Data.List | |
16 | import Test.Tasty | |
17 | -- import Test.Tasty.HUnit | |
18 | import Data.Either | |
19 | import Test.Tasty.QuickCheck hiding (Failure, Success) | |
20 | ||
21 | import Crypto.Macaroon | |
22 | import Crypto.Macaroon.Verifier.Internal | |
23 | ||
24 | import Crypto.Macaroon.Instances | |
25 | ||
26 | tests :: TestTree | |
27 | tests = testGroup "Crypto.Macaroon.Verifier.Internal" [ sigs | |
28 | ] | |
29 | ||
30 | sigs = testProperty "Signatures" $ \sm -> verifySig (secret sm) (macaroon sm) == Right (macaroon sm) |