tester that compiles

This commit is contained in:
Christopher McArthur
2020-05-18 22:25:19 -04:00
parent 494cb2c051
commit 56ffe083ae
3 changed files with 80 additions and 59 deletions

View File

@@ -346,14 +346,14 @@ TEST(TokenTest, VerifyFail) {
auto verify = jwt::verify()
.allow_algorithm(jwt::algorithm::none{})
.with_issuer("auth0")
.with_claim("myclaim", jwt::claim(std::string("test")));
.with_claim("myclaim", jwt::claim<jwt::picojson_traits>(std::string("test")));
ASSERT_THROW(verify.verify(decoded_token), jwt::token_verification_exception);
}
{
jwt::claim object;
jwt::claim<jwt::picojson_traits> object;
std::istringstream iss{R"({ "test": null })"};
iss >> object;
ASSERT_EQ(object.get_type() , jwt::claim::type::object);
ASSERT_EQ(object.get_type() , jwt::json::type::object);
auto verify = jwt::verify()
.allow_algorithm(jwt::algorithm::none{})