aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/tests/test_views.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-05-29 13:22:56 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-05-29 13:22:56 +0100
commit8edc6a41c160ff75e964db45371e4ae63fb68c17 (patch)
tree6c5d941aa842dc75ae3939d56de1020c13320467 /ctrack/organisations/tests/test_views.py
parent2fd651e2cb3a4cd3a31921032af0279d156dd053 (diff)
a lot of time and effort looking for a bug with selenium that wasnt there
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/tests/test_views.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/ctrack/organisations/tests/test_views.py b/ctrack/organisations/tests/test_views.py
index 2111410..1e2476d 100644
--- a/ctrack/organisations/tests/test_views.py
+++ b/ctrack/organisations/tests/test_views.py
@@ -3,6 +3,7 @@ from django.contrib.auth import get_user_model
from django.test import RequestFactory
from ctrack.organisations.tests.factories import OrganisationFactory
+from ctrack.organisations.views import IncidentReportCreateView
from ..views import OrganisationListView
@@ -25,3 +26,15 @@ def test_organisation_list_view():
response = OrganisationListView.as_view()(request)
assert response.status_code == 200
assert len(response.context_data["organisation_list"]) == 3
+
+
+def test_incident_report_create_view():
+ user = get_user_model().objects.create_user(
+ username="testy", email="testy@test.com", password="test1020"
+ )
+ org = OrganisationFactory.create()
+ factory = RequestFactory()
+ request = factory.get(f"{org.name}/create-incident-report")
+ request.user = user
+ response = IncidentReportCreateView.as_view()(request)
+ assert response.status_code == 200