Update jose to 0.8 (and adapt error message test) (#1324)

The message changes between jose versions 0.7 and 0.8.
This commit is contained in:
Robert
2019-07-04 10:56:45 -05:00
committed by Steve Chávez
parent e3a53de8a6
commit 617bf7b6a3
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -117,11 +117,11 @@ spec actualPgVersion = describe "authorization" $ do
it "hides tables from users with invalid JWT" $ do
let auth = authHeaderJWT "ey9zdGdyZXN0X3Rlc3RfYXV0aG9yIiwiaWQiOiJqZG9lIn0.y4vZuu1dDdwAl0-S00MCRWRYMlJ5YAMSir6Es6WtWx0"
request methodGet "/authors_only" [auth] ""
`shouldRespondWith` [json| {"message":"JWSError (CompactDecodeError \"expected 3 parts, got 2\")"} |]
`shouldRespondWith` [json| {"message":"JWSError (CompactDecodeError CompactDecodeError: Expected 3 parts; got 2)"} |]
{ matchStatus = 401
, matchHeaders = [
"WWW-Authenticate" <:>
"Bearer error=\"invalid_token\", error_description=\"JWSError (CompactDecodeError \\\"expected 3 parts, got 2\\\")\""
"Bearer error=\"invalid_token\", error_description=\"JWSError (CompactDecodeError CompactDecodeError: Expected 3 parts; got 2)\""
]
}