aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/tests
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-01-20 19:47:15 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-01-20 19:47:15 +0000
commitb56df3b59558e790b1e9a7a4aab16fa4c798110c (patch)
treef0b2e5d192a95e1634df96a89f6c3b4d7dc46334 /ctrack/organisations/tests
parent9ebc666f819897aac04e9bc529a39fb40ee7abfb (diff)
first passing test!
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}/"