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 2012/12/19 17:25:53 UTC

[15/48] git commit: [#5389] ticket:229 test diff viewer mode switching

[#5389] ticket:229 test diff viewer mode switching


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

Branch: refs/heads/db/4790
Commit: 5e6d4a8df8a46cd9322461fd0ef90ae8104945ca
Parents: d0338fc
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri Dec 7 14:39:30 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Mon Dec 17 22:21:17 2012 +0000

----------------------------------------------------------------------
 .../forgegit/tests/functional/test_controllers.py  |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5e6d4a8d/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 c6e9cc8..7a83039 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -162,6 +162,16 @@ class TestRootController(_TestCase):
         assert 'readme' in resp, resp.showbrowser()
         assert '+++' in resp, resp.showbrowser()
 
+    def test_diff_view_mode(self):
+        ci = self._get_ci()
+        fn = 'tree/README?diff=df30427c488aeab84b2352bdf88a3b19223f9d7a'
+        r = self.app.get(ci + fn + '&diformat=regular')
+        assert fn + '&amp;diformat=sidebyside">Switch to side-by-side view</a>' in r
+
+        r = self.app.get(ci + fn + '&diformat=sidebyside')
+        assert fn + '&amp;diformat=regular">Switch to regular view</a>' in r
+        assert '<table class="side-by-side-diff">' in r
+
     def test_refresh(self):
         notification = M.Notification.query.find(
             dict(subject='[test:src-git] 4 new commits to test Git')).first()