Skip to content

Commit

Permalink
fix(test): assertions for missing claim on AuthProvider were not correct
Browse files Browse the repository at this point in the history
the test was giving us a false positive because the verifier fixture is
also not behaving correctly when returning `uses_auth_verification`.

the test now fails, but the assertions are accurate based on what we have
in `benefits.oauth.views.authorize` and `benefits.oauth.middleware`.
  • Loading branch information
angela-tran committed May 30, 2024
1 parent dd13db0 commit b55ab5e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/pytest/oauth/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,9 @@ def test_authorize_success_without_verifier_claim(

result = authorize(app_request)

mocked_oauth_client.authorize_access_token.assert_called_with(app_request)
assert session.oauth_claim(app_request) is None
assert result.status_code == 302
assert result.url == reverse(ROUTE_CONFIRM)
assert result.status_code == 200
assert result.template_name == TEMPLATE_USER_ERROR


@pytest.mark.django_db
Expand Down

0 comments on commit b55ab5e

Please sign in to comment.