Skip to content

Implement async/sync tests for nbf claim#537

Merged
ziluvatar merged 1 commit intoauth0:masterfrom
MitMaro:nbf-async-tests
Oct 16, 2018
Merged

Implement async/sync tests for nbf claim#537
ziluvatar merged 1 commit intoauth0:masterfrom
MitMaro:nbf-async-tests

Conversation

@MitMaro
Copy link
Copy Markdown
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