aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/users/tests
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-05-25 17:15:35 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-05-25 17:15:35 +0100
commita9d29f8ae6b558c608b9bdf9f7260873a6ee3859 (patch)
tree83e632befd71ba906fd1590874af34aa851c11fb /ctrack/users/tests
parent022604fbc79a30e38a99ef1778e2e5e028542388 (diff)
added to README and enhanced view test
Diffstat (limited to 'ctrack/users/tests')
-rw-r--r--ctrack/users/tests/test_views.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ctrack/users/tests/test_views.py b/ctrack/users/tests/test_views.py
index 7c1d33c..7c2c8be 100644
--- a/ctrack/users/tests/test_views.py
+++ b/ctrack/users/tests/test_views.py
@@ -56,7 +56,7 @@ def test_profile_view_contains_organisation_information(person):
user = get_user_model().objects.create_user(
username="testy", email="testy@test.com", password="test1020"
)
- org = person.organisation.name
+ org_name = person.organisation.name
stakeholder = Stakeholder.objects.create(person=person)
user.stakeholder = stakeholder
user.save()
@@ -70,6 +70,11 @@ def test_profile_view_contains_organisation_information(person):
assert response.context_data["user"].username == "testy"
assert response.context_data["user"].is_stakeholder() is True
assert response.context_data["user"].stakeholder.person.first_name == "Chinaplate"
+ assert (
+ response.context_data["user"].stakeholder.person.get_organisation_name()
+ == org_name
+ )
+ assert response.context_data["user"].get_organisation_name() == org_name
# assert response.context_data["user"].stakeholder.person.first_name == "Chinaplate"