allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject allura git commit: [#7865] add test
Date Wed, 01 Apr 2015 14:47:00 GMT
Repository: allura
Updated Branches:
  refs/heads/db/7865 7f451eeb8 -> 6ff843e2c


[#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/6ff843e2
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6ff843e2
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6ff843e2

Branch: refs/heads/db/7865
Commit: 6ff843e2c4e0acc75f2c5bbaa4f65bb09c2f5b1e
Parents: 7f451ee
Author: Dave Brondsema <dave@brondsema.net>
Authored: Wed Apr 1 10:46:50 2015 -0400
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Wed Apr 1 10:46:50 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/6ff843e2/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):
 


Mime
View raw message