summaryrefslogtreecommitdiffstats
path: root/pharos-dashboard/src/account/tests/test_general.py
diff options
context:
space:
mode:
Diffstat (limited to 'pharos-dashboard/src/account/tests/test_general.py')
-rw-r--r--pharos-dashboard/src/account/tests/test_general.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pharos-dashboard/src/account/tests/test_general.py b/pharos-dashboard/src/account/tests/test_general.py
index 72e7ea1..e8f483b 100644
--- a/pharos-dashboard/src/account/tests/test_general.py
+++ b/pharos-dashboard/src/account/tests/test_general.py
@@ -48,3 +48,13 @@ class AccountMiddlewareTestCase(TestCase):
self.user1profile.save()
self.client.get(url)
self.assertEqual(timezone.get_current_timezone_name(), 'Etc/Greenwich')
+
+ # if there is no profile for a user, it should be created
+ user2 = User.objects.create(username='user2')
+ user2.set_password('user2')
+ user2.save()
+ self.client.login(username='user2', password='user2')
+ self.client.get(url)
+ self.assertTrue(user2.userprofile)
+
+