Skip to content

Commit

Permalink
peamu: Test logout with AnonymousUsers
Browse files Browse the repository at this point in the history
  • Loading branch information
tonial authored and celine-m-s committed Jul 13, 2022
1 parent a14f1d3 commit ab49663
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions itou/allauth_adapters/peamu/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,8 @@ def test_job_seeker_temporary_nir_with_pe_conect(self, mock_login_signal):
self.login(self.get_mocked_response())
job_seeker = User.objects.get(email="john.doe@example.com")
self.assertIsNone(job_seeker.nir)

def test_anonymous_user_logout(self):
# An AnonymousUser does not have the peamu_id_token attribute
# but logout should not raise an error
self.client.post(reverse("account_logout"))

0 comments on commit ab49663

Please sign in to comment.