aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/tests/test_views.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-18 14:50:00 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-18 14:50:00 +0100
commitfed4b3157f25f65ccdaa5fd41463995a080d4673 (patch)
tree9ad2cea4a1076663f18ed27e738da979dfe7e128 /ctrack/register/tests/test_views.py
parentbc10c9df7b9d3678e4efd9d05055f41ccd8a763f (diff)
nice links from org detail page to specific types of simple event
Diffstat (limited to 'ctrack/register/tests/test_views.py')
-rw-r--r--ctrack/register/tests/test_views.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/ctrack/register/tests/test_views.py b/ctrack/register/tests/test_views.py
index 5f7ca35..0f5575d 100644
--- a/ctrack/register/tests/test_views.py
+++ b/ctrack/register/tests/test_views.py
@@ -127,13 +127,26 @@ class TestSingleDateTimeEvent:
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}"
+ url = reverse("register:event_create_simple_event_from_org", args=[slug])
request = request_factory.get(url)
request.user = user
view.request = request
view.setup(request)
assert "org_slug" in view.get_form_kwargs()
+ def test_meeting_type_and_org_passed_as_kwarg(
+ self, user, org, request_factory
+ ):
+ event_type = "PHONE_CALL"
+ slug = org.slug
+ view = SingleDateTimeEventCreate()
+ url = reverse("register:event_create_simple_event_from_org_with_type", args=[slug, event_type])
+ request = request_factory.get(url)
+ request.user = user
+ view.request = request
+ view.setup(request)
+ assert "event_type" in view.get_form_kwargs()
+
class TestSingleDateCAFEventViews:
def test_initial_caf_received(self, client):