diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-16 14:29:01 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-16 14:29:01 +0100 |
commit | 59592232da815f4e8c6f61cb9042e738990c1b6e (patch) | |
tree | 37f078cc978731f79fdda7a3fbf25473294857fd /ctrack/register/tests/test_views.py | |
parent | 404981d748efc345fa7edfc8538306ce61ce81ad (diff) |
better handling of simple event form and participants
Diffstat (limited to '')
-rw-r--r-- | ctrack/register/tests/test_views.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ctrack/register/tests/test_views.py b/ctrack/register/tests/test_views.py index 94edc4f..5f7ca35 100644 --- a/ctrack/register/tests/test_views.py +++ b/ctrack/register/tests/test_views.py @@ -108,9 +108,16 @@ class TestSingleDateTimeEvent: view.setup(request) assert "user" in view.get_form_kwargs() + def test_create_simple_event_without_org_means_no_participants(self, user, client): + client.force_login(user) + url = reverse("register:event_create_simple_event") + response = client.get(url) + html = response.content.decode("utf-8") + assert '<input type="hidden" name="participants" id="id_participants">' in html + def test_can_create_simple_event_with_org_slug(self, user, org, client): slug = org.slug - url = f"/register/event/create-simple-event-from-org/{slug}" + url = reverse("register:event_create_simple_event_from_org", args=[slug]) client.force_login(user) response = client.get(url) html = response.content.decode("utf-8") |