You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/07/18 21:02:27 UTC

[20/28] git commit: [#7545] strengthen negative test cases

[#7545] strengthen negative test cases


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/3ec8ae85
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/3ec8ae85
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/3ec8ae85

Branch: refs/heads/db/7523
Commit: 3ec8ae859b26136e64b1b065a4d122d9c5511889
Parents: 949bae9
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Jul 16 14:17:06 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Jul 16 14:17:16 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_auth.py | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/3ec8ae85/Allura/allura/tests/functional/test_auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_auth.py b/Allura/allura/tests/functional/test_auth.py
index b68ef17..1c41e8a 100644
--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -313,6 +313,13 @@ class TestAuth(TestController):
         r = self.app.post('/auth/do_login', params=dict(
             username='test-user', password='foo',
             return_to='http://example.com/foo'))
+        assert_equal(r.location, 'http://localhost/')
+
+        r = self.app.get('/auth/logout')
+        r = self.app.post('/auth/do_login', params=dict(
+            username='test-user', password='foo',
+            return_to='//example.com/foo'))
+        assert_equal(r.location, 'http://localhost/')
 
 
 class TestPreferences(TestController):