aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/tests/test_models.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-10-18 16:33:07 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-10-18 16:33:07 +0100
commitdbc2cf0662323abadd08b0d7eb6746905466017d (patch)
tree0161f6a0d23e145806086b3ad964d9f0416582a9 /ctrack/organisations/tests/test_models.py
parentd6a3d976e0a7bd2bde93a5ea5543e9e68922520d (diff)
basic inclusion of single datetime events in org detail page - no formatting and passing tests
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/tests/test_models.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ctrack/organisations/tests/test_models.py b/ctrack/organisations/tests/test_models.py
index e4caeb5..141f518 100644
--- a/ctrack/organisations/tests/test_models.py
+++ b/ctrack/organisations/tests/test_models.py
@@ -7,7 +7,7 @@ from ctrack.caf.models import CAF, Grading
from ctrack.caf.models import EssentialService
from ctrack.caf.tests.factories import ApplicableSystemFactory
from ctrack.core.utils import fnames
-from ctrack.organisations.tests.factories import PersonFactory
+from ctrack.organisations.tests.factories import PersonFactory, SingleDateTimeEventFactory
pytestmark = pytest.mark.django_db
@@ -28,6 +28,13 @@ def test_organisation_get_absolute_url(org):
assert org.get_absolute_url() == f"/organisations/{slug}/"
+def test_can_get_all_single_datetime_events_involving_person(person):
+ e = SingleDateTimeEventFactory.create(type_descriptor="MEETING", short_description="No desc")
+ e.participants.add(person)
+ events_involving_person = person.get_single_datetime_events()
+ assert events_involving_person.first().short_description == "No desc"
+
+
def test_update_organisation(org_with_people):
# Change the name of the organisation
org_with_people.name = "Tonkers Ltd"