From 86f3882318d323d1920ca1c7da6e816f0ed376da Mon Sep 17 00:00:00 2001 From: Julien Tanguy Date: Mon, 17 Aug 2015 17:38:24 +0200 Subject: Change verifier api and split Verifier module - Added haddocks --- test/Crypto/Macaroon/Verifier/Internal/Tests.hs | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/Crypto/Macaroon/Verifier/Internal/Tests.hs (limited to 'test/Crypto/Macaroon/Verifier/Internal/Tests.hs') 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 @@ +{-# LANGUAGE OverloadedStrings #-} +{-| +Copyright : (c) 2015 Julien Tanguy +License : BSD3 + +Maintainer : julien.tanguy@jhome.fr + + +This test suite is based on the pymacaroons test suite: + +-} +module Crypto.Macaroon.Verifier.Internal.Tests where + +import qualified Data.ByteString.Char8 as B8 +import Data.List +import Test.Tasty +-- import Test.Tasty.HUnit +import Data.Either +import Test.Tasty.QuickCheck hiding (Failure, Success) + +import Crypto.Macaroon +import Crypto.Macaroon.Verifier.Internal + +import Crypto.Macaroon.Instances + +tests :: TestTree +tests = testGroup "Crypto.Macaroon.Verifier.Internal" [ sigs + ] + +sigs = testProperty "Signatures" $ \sm -> verifySig (secret sm) (macaroon sm) == Right (macaroon sm) -- cgit v1.2.3