diff --git a/tests/frontend/views/test_auth.py b/tests/frontend/views/test_auth.py index 4d598d5d8..73d131b91 100644 --- a/tests/frontend/views/test_auth.py +++ b/tests/frontend/views/test_auth.py @@ -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@example.com"}, + "userinfo": { + "email": "email@example.com", + "oid": "12345678" + }, } user = users["normal_user"] assert user.justice_email is None @@ -36,6 +39,7 @@ def test_success(self, oauth, client, users): user.refresh_from_db() assert user.justice_email == "email@example.com" + assert user.azure_oid == "12345678" assertContains(response, "Successfully authenticated with your email email@example.com") @patch("controlpanel.frontend.views.auth.oauth")