]> git.immae.eu Git - github/fretlink/hmacaroons.git/blame - test/Crypto/Macaroon/Verifier/Internal/Tests.hs
Change verifier api and split Verifier module
[github/fretlink/hmacaroons.git] / test / Crypto / Macaroon / Verifier / Internal / Tests.hs
CommitLineData
86f38823
JT
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)