1 {-# LANGUAGE OverloadedStrings #-}
3 Copyright : (c) 2015 Julien Tanguy
6 Maintainer : julien.tanguy@jhome.fr
9 This test suite is based on the pymacaroons test suite:
10 <https://github.com/ecordell/pymacaroons>
12 module Crypto.Macaroon.Verifier.Tests where
15 import qualified Data.ByteString.Char8 as B8
19 import Test.Tasty.HUnit
20 import Test.Tasty.QuickCheck
22 import Crypto.Macaroon
23 import Crypto.Macaroon.Verifier
25 import Crypto.Macaroon.Instances
28 tests = testGroup "Crypto.Macaroon.Verifier" [ ]
33 sec = B8.pack "this is our super secret key; only we should know it"
36 m = create sec key loc
38 key = B8.pack "we used our sec key"
39 loc = B8.pack "http://mybank/"
42 m2 = addFirstPartyCaveat "test = caveat" m
45 m3 = addFirstPartyCaveat "value = 42" m2