diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-16 13:54:53 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-16 14:01:06 +0100 |
commit | d55de5277f54a2a88eae8b7ec27585bc9a0df165 (patch) | |
tree | 97f4bd87a9394355ab58b34e3a1abca12ebc344e /ctrack/register/tests/test_views.py | |
parent | eb8497dcd3758d20447d4de977780c2c78a38613 (diff) |
participants added to create new simple event form and can filter by org when landed from org detail
Diffstat (limited to 'ctrack/register/tests/test_views.py')
-rw-r--r-- | ctrack/register/tests/test_views.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ctrack/register/tests/test_views.py b/ctrack/register/tests/test_views.py index b806165..94edc4f 100644 --- a/ctrack/register/tests/test_views.py +++ b/ctrack/register/tests/test_views.py @@ -108,6 +108,25 @@ class TestSingleDateTimeEvent: view.setup(request) assert "user" in view.get_form_kwargs() + 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}" + client.force_login(user) + response = client.get(url) + html = response.content.decode("utf-8") + assert response.status_code == 200 + test_case.assertInHTML("Create a new simple event", html) + + def test_org_passed_as_kwarg(self, user, org, request_factory): + slug = org.slug + view = SingleDateTimeEventCreate() + url = f"/register/event/create-simple-event-from-org/{slug}" + request = request_factory.get(url) + request.user = user + view.request = request + view.setup(request) + assert "org_slug" in view.get_form_kwargs() + class TestSingleDateCAFEventViews: def test_initial_caf_received(self, client): |