Skip to content

Commit

Permalink
Update related test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljcollinsuk committed Apr 10, 2024
1 parent 26d6e18 commit 6c02aba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/frontend/views/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def test_justice_auth_feature_flag_disabled_for_normal_user(self, users, client)
@patch("controlpanel.frontend.views.auth.oauth")
def test_success(self, oauth, client, users):
oauth.azure.authorize_access_token.return_value = {
"userinfo": {"email": "[email protected]"},
"userinfo": {
"email": "[email protected]",
"oid": "12345678"
},
}
user = users["normal_user"]
assert user.justice_email is None
Expand All @@ -36,6 +39,7 @@ def test_success(self, oauth, client, users):

user.refresh_from_db()
assert user.justice_email == "[email protected]"
assert user.azure_oid == "12345678"
assertContains(response, "Successfully authenticated with your email [email protected]")

@patch("controlpanel.frontend.views.auth.oauth")
Expand Down

0 comments on commit 6c02aba

Please sign in to comment.