Skip to content
Snippets Groups Projects
Commit 1f17688c authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Account page should only be accessed when logged in

parent d8b38911
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,15 @@ class AboutPageTests(TestCase):
self.assertEqual(response.status_code, 200)
class AccountPageTests(TestCase):
def test_works(self):
response = self.client.get(reverse('basetheme_bootstrap:account'))
self.assertRedirects(
response,
expected_url=reverse('basetheme_bootstrap:login') + "?next=" + reverse('basetheme_bootstrap:account'),
)
class SignUpTests(TestCase):
def setUp(self):
......
......@@ -134,6 +134,7 @@ def user_delete(request):
})
@login_required
def account_detail(request):
klass = user_preferences.get_user_preference_class()
if klass is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment