aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/Crypto/Macaroon/Verifier/Internal/Tests.hs
diff options
context:
space:
mode:
authorJulien Tanguy <julien.tanguy@jhome.fr>2015-08-17 17:38:24 +0200
committerJulien Tanguy <julien.tanguy@jhome.fr>2015-08-17 17:39:31 +0200
commit86f3882318d323d1920ca1c7da6e816f0ed376da (patch)
tree0e16232125c2fb6c0413d654e6b1537c9813b301 /test/Crypto/Macaroon/Verifier/Internal/Tests.hs
parentbf31e29028a4402ea0d2deefdb3b86efd526acd0 (diff)
downloadhmacaroons-86f3882318d323d1920ca1c7da6e816f0ed376da.tar.gz
hmacaroons-86f3882318d323d1920ca1c7da6e816f0ed376da.tar.zst
hmacaroons-86f3882318d323d1920ca1c7da6e816f0ed376da.zip
Change verifier api and split Verifier module
- Added haddocks
Diffstat (limited to 'test/Crypto/Macaroon/Verifier/Internal/Tests.hs')
-rw-r--r--test/Crypto/Macaroon/Verifier/Internal/Tests.hs30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Crypto/Macaroon/Verifier/Internal/Tests.hs b/test/Crypto/Macaroon/Verifier/Internal/Tests.hs
new file mode 100644
index 0000000..cd75118
--- /dev/null
+++ b/test/Crypto/Macaroon/Verifier/Internal/Tests.hs
@@ -0,0 +1,30 @@
1{-# LANGUAGE OverloadedStrings #-}
2{-|
3Copyright : (c) 2015 Julien Tanguy
4License : BSD3
5
6Maintainer : julien.tanguy@jhome.fr
7
8
9This test suite is based on the pymacaroons test suite:
10<https://github.com/ecordell/pymacaroons>
11-}
12module Crypto.Macaroon.Verifier.Internal.Tests where
13
14import qualified Data.ByteString.Char8 as B8
15import Data.List
16import Test.Tasty
17-- import Test.Tasty.HUnit
18import Data.Either
19import Test.Tasty.QuickCheck hiding (Failure, Success)
20
21import Crypto.Macaroon
22import Crypto.Macaroon.Verifier.Internal
23
24import Crypto.Macaroon.Instances
25
26tests :: TestTree
27tests = testGroup "Crypto.Macaroon.Verifier.Internal" [ sigs
28 ]
29
30sigs = testProperty "Signatures" $ \sm -> verifySig (secret sm) (macaroon sm) == Right (macaroon sm)