Test that an improperly encoded JWT returns a DecodeError
The subject of this commit message says it all.
This commit is contained in:
parent
d34b146702
commit
526728eb89
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,9 @@ main = hspec $ do
|
|||
describe "GoogleSignIn" $
|
||||
describe "jwtIsValid" $ do
|
||||
let jwtIsValid' = GoogleSignIn.jwtIsValid True
|
||||
it "returns a decode error when an incorrectly encoded JWT is used" $ do
|
||||
jwtIsValid' (GoogleSignIn.EncodedJWT "rubbish") `shouldReturn` DecodeError
|
||||
|
||||
it "returns validation error when the aud field doesn't match my client ID" $ do
|
||||
let auds = ["wrong-client-id"]
|
||||
|> fmap TestUtils.unsafeStringOrURI
|
||||
|
|
Loading…
Reference in a new issue