aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/tests/test_event_models.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-16 11:05:42 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-16 11:05:42 +0100
commiteb8497dcd3758d20447d4de977780c2c78a38613 (patch)
treef5c188ad01ac8db9156db587c821706396671100 /ctrack/register/tests/test_event_models.py
parentc0067e3dd35f56ad0cf9452f9ef1e8532b6378b4 (diff)
Improvements to simple event form.
Diffstat (limited to '')
-rw-r--r--ctrack/register/tests/test_models.py (renamed from ctrack/register/tests/test_event_models.py)15
1 files changed, 15 insertions, 0 deletions
diff --git a/ctrack/register/tests/test_event_models.py b/ctrack/register/tests/test_models.py
index e92b282..1f8923b 100644
--- a/ctrack/register/tests/test_event_models.py
+++ b/ctrack/register/tests/test_models.py
@@ -150,6 +150,7 @@ def test_event_type_enum():
assert EventType.PHONE_CALL.name == "PHONE_CALL"
assert EventType.VIDEO_CALL.name == "VIDEO_CALL"
assert EventType.EMAIL.name == "EMAIL"
+ assert EventType.NOTE.name == "NOTE"
assert EventType.CAF_INITIAL_CAF_RECEIVED.name == "CAF_INITIAL_CAF_RECEIVED"
assert EventType.CAF_FEEDBACK_EMAILED_OES.name == "CAF_FEEDBACK_EMAILED_OES"
assert EventType.CAF_RECEIVED.name == "CAF_RECEIVED"
@@ -217,3 +218,17 @@ def test_meeting_event(user, person):
assert e.user.name == uname
assert e.created_date.day == now.day
assert e.modified_date.day == now.day
+
+
+@pytest.mark.parametrize("allowed_type", ["NOTE"])
+def test_note_event(user, allowed_type):
+ e = SingleDateTimeEvent.objects.create(
+ type_descriptor=allowed_type,
+ short_description="Test short description",
+ datetime="2020-10-10 10:30",
+ comments="The guy I deal with at X Co Ltd is made of cheese,",
+ url="https://evidenceofcheese.com",
+ private=True,
+ user=user
+ )
+ assert e.type_descriptor == allowed_type