Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement async/sync tests for nbf claim #537

Merged
merged 1 commit into from
Oct 16, 2018

Conversation

MitMaro
Copy link
Contributor

@MitMaro MitMaro commented Oct 16, 2018

For #492

This implements the test helpers introduced in #523 for the nbf claim.

There was one test case that required a code change. When the not before is provided using an empty string, the error is thrown synchronously during an asynchronous call. This error is already triggered by another error (#499) and similar to #536, so I believe it is okay to fix the handling of this error even if it is a slight behaviour change.

Coverage Master

=============================== Coverage summary ===============================
Statements   : 97.89% ( 232/237 )
Branches     : 97.55% ( 199/204 )
Functions    : 100% ( 23/23 )
Lines        : 98.29% ( 230/234 )
================================================================================

Coverage Branch

=============================== Coverage summary ===============================
Statements   : 97.91% ( 234/239 )
Branches     : 97.55% ( 199/204 )
Functions    : 100% ( 23/23 )
Lines        : 98.31% ( 232/236 )
================================================================================

Refactor the existing tests for the nbf claim to use the async/sync test
helpers. This required fixing a case where an error was improperly
handled for an async call.
@ziluvatar ziluvatar merged commit 88bc965 into auth0:master Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants