diff --git a/basetheme_bootstrap/tests.py b/basetheme_bootstrap/tests.py index 52ad2d454cbcdc568639b55b06d7d30149f911e7..5bd3599226b73774c3719888c2e6836a29d05439 100644 --- a/basetheme_bootstrap/tests.py +++ b/basetheme_bootstrap/tests.py @@ -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): diff --git a/basetheme_bootstrap/views.py b/basetheme_bootstrap/views.py index 2b35b2ec6f8cd84a6ea5f64d10a6fd0f57ad48b3..c7d1c05e9b13c087977b97cfb750c69217dfb80e 100644 --- a/basetheme_bootstrap/views.py +++ b/basetheme_bootstrap/views.py @@ -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: