You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/04/16 17:43:55 UTC

[05/22] allura git commit: [#7865] add test

[#7865] add test


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

Branch: refs/heads/ib/6017
Commit: 7ee773459f12a85f7d207c83a2a7825264dfc6fc
Parents: 8504385
Author: Dave Brondsema <da...@brondsema.net>
Authored: Wed Apr 1 10:46:50 2015 -0400
Committer: Heith Seewald <hs...@slashdotmedia.com>
Committed: Fri Apr 3 15:43:49 2015 -0400

----------------------------------------------------------------------
 ForgeGit/forgegit/tests/functional/test_controllers.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/7ee77345/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 6a81b87..dacec3e 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -415,6 +415,19 @@ class TestRootController(_TestCase):
         assert_not_in('<span>bad</span>', r)
         assert_in('<span>README</span>', r)
 
+    def test_set_checkout_url(self):
+        r = self.app.get('/p/test/admin/src-git/checkout_url')
+        r.form['external_checkout_url'].value = 'http://foo.bar/baz'
+        r.form['merge_disabled'].checked = True
+        r = r.form.submit()
+        assert_equal(json.loads(self.webflash(r))['message'],
+                     "External checkout URL successfully changed. One-click merge disabled.")
+        # for some reason c.app.config.options has old values still
+        app_config = M.AppConfig.query.get(_id=c.app.config._id)
+        assert_equal(app_config.options['external_checkout_url'], 'http://foo.bar/baz')
+        assert_equal(app_config.options['merge_disabled'], True)
+
+
 
 class TestRestController(_TestCase):