aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/tests/test_views.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-20 16:39:48 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-20 16:39:48 +0100
commit5ee4335eb92f2dc35b31c208bce8d8e8aef9e5f2 (patch)
treea69ef6c431a6ae0fb5224d0a4c843707f01ddbcb /ctrack/organisations/tests/test_views.py
parentf4aa5e17544c27fcddb5d8977a3653a31bfccd4d (diff)
added org list hard-filtered by lead inspector
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/tests/test_views.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ctrack/organisations/tests/test_views.py b/ctrack/organisations/tests/test_views.py
index a567fab..3584d96 100644
--- a/ctrack/organisations/tests/test_views.py
+++ b/ctrack/organisations/tests/test_views.py
@@ -16,6 +16,13 @@ from ..views import OrganisationListView
pytestmark = pytest.mark.django_db
+def test_organisation_by_inspector_view(inspector1, inspector2, client, submode):
+ org = OrganisationFactory(submode=submode, lead_inspector=inspector1, deputy_lead_inspector=inspector2)
+ client.force_login(inspector1)
+ response = client.get(reverse("organisations:list_by_inspector", args=[inspector1.id]))
+ assert response.status_code == 200
+
+
def test_meetings_in_organisation_detail_view(user, client, org_with_people):
org_list_permission = Permission.objects.get(name="Can view organisation")
assert user.user_permissions.count() == 0