changeset 1423:d1d644d79cad

adapt the usersettings test, so it expects the redirect if the user is not logged in. todo: test with a logged-in user.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 14 Jul 2012 23:51:45 +0200
parents 7acb182186e2
children cf62198c81f7 0841def67b6c
files MoinMoin/apps/frontend/_tests/test_frontend.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/_tests/test_frontend.py	Sat Jul 14 22:12:02 2012 +0200
+++ b/MoinMoin/apps/frontend/_tests/test_frontend.py	Sat Jul 14 23:51:45 2012 +0200
@@ -187,8 +187,11 @@
     def test_logout(self):
         self._test_view('frontend.logout', status='302 FOUND', data=['<!DOCTYPE HTML'])
 
-    def test_usersettings(self):
-        self._test_view('frontend.usersettings')
+    def test_usersettings_notloggedin(self):
+        # if a anon user visits usersettings view, he'll get redirected to the login view
+        self._test_view('frontend.usersettings', status='302 FOUND', data=['<!DOCTYPE HTML'])
+
+    # TODO: implement test_usersettings_loggedin()
 
     def test_bookmark(self):
         self._test_view('frontend.bookmark', status='302 FOUND', data=['<!DOCTYPE HTML'])