aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ctrack/organisations/tests')
-rw-r--r--ctrack/organisations/tests/__init__.py0
-rw-r--r--ctrack/organisations/tests/test_models.py11
2 files changed, 11 insertions, 0 deletions
diff --git a/ctrack/organisations/tests/__init__.py b/ctrack/organisations/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ctrack/organisations/tests/__init__.py
diff --git a/ctrack/organisations/tests/test_models.py b/ctrack/organisations/tests/test_models.py
new file mode 100644
index 0000000..1307a83
--- /dev/null
+++ b/ctrack/organisations/tests/test_models.py
@@ -0,0 +1,11 @@
+import pytest
+from slugify import slugify
+
+from ..models import Organisation
+
+pytestmark = pytest.mark.django_db
+
+
+def test_organisation_get_absolute_url(org: Organisation):
+ slug = slugify(org.name)
+ assert org.get_absolute_url() == f"/organisations/{slug}/"