Skip to content

Commit

Permalink
fixup! (surveys) manage permission to access survey create form, with…
Browse files Browse the repository at this point in the history
… tally waiting list
  • Loading branch information
vincentporte committed Feb 8, 2024
1 parent c0e9269 commit 69a0a8a
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lacommunaute/surveys/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ def test_user_can_view_own_survey(self, db, client):

class TestHomeView:
def test_link_to_dsp(self, db, client):
user = UserFactory()
client.force_login(user)
url = reverse("pages:home")
response = client.get(url)
assert response.status_code == 200
assertNotContains(response, reverse("surveys:dsp_create"))

user.is_superuser = True
user.save()
response = client.get(url)
assert response.status_code == 200
client.force_login(UserFactory())
response = client.get(reverse("pages:home"))
assertContains(response, reverse("surveys:dsp_create"))

0 comments on commit 69a0a8a

Please sign in to comment.