aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/tests/test_views.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-16 13:54:53 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-16 13:54:53 +0100
commit9f9528a0cc7b05166669fee163d655e5e1b7e563 (patch)
tree6997bd889db2fb672ce09f540d5dc17434660944 /ctrack/register/tests/test_views.py
parenteb8497dcd3758d20447d4de977780c2c78a38613 (diff)
participants added to create new simple event form and can filter by org when landed from org detail
Diffstat (limited to '')
-rw-r--r--ctrack/register/tests/test_views.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/ctrack/register/tests/test_views.py b/ctrack/register/tests/test_views.py
index b806165..da26d50 100644
--- a/ctrack/register/tests/test_views.py
+++ b/ctrack/register/tests/test_views.py
@@ -108,6 +108,27 @@ 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)
+
+
+ @pytest.mark.skip("Until we know what we're doing")
+ 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" in view.get_form_kwargs()
+
class TestSingleDateCAFEventViews:
def test_initial_caf_received(self, client):