diff options
author | Mads Kiilerich <madski@unity3d.com> | 2013-02-01 23:13:10 +0100 |
---|---|---|
committer | Mads Kiilerich <madski@unity3d.com> | 2013-02-01 23:13:10 +0100 |
commit | a8c227acb8fa512dae2f4858dba0a08f4164b3d7 (patch) | |
tree | ebad6a2645349fa8846f4d9d7f70f1999e557ac2 /rhodecode/tests | |
parent | 29cdb53ca6e8f85caf987149863a2c53698ea0f8 (diff) |
compare: swap org and other when they refer to different repos, ie are pull request style
Pull requests will have a different from/to description - but in a consistent
and slightly better way that can be improved later.
A pull request diff is empathic: "How will this look for the peer I'm proposing to" style.
--HG--
branch : beta
extra : rebase_source : f0a793fbc351157d0472b3fa6a7129d152e3d5a6
Diffstat (limited to 'rhodecode/tests')
-rw-r--r-- | rhodecode/tests/functional/test_compare.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/rhodecode/tests/functional/test_compare.py b/rhodecode/tests/functional/test_compare.py index d505cb13..e5dcbf78 100644 --- a/rhodecode/tests/functional/test_compare.py +++ b/rhodecode/tests/functional/test_compare.py @@ -89,16 +89,16 @@ class TestCompareController(TestController): rev1 = 'default' rev2 = 'default' response = self.app.get(url(controller='compare', action='index', - repo_name=repo2.repo_name, + repo_name=repo1.repo_name, org_ref_type="branch", - org_ref=rev1, - other_repo=repo1.repo_name, + org_ref=rev2, + other_repo=repo2.repo_name, other_ref_type="branch", - other_ref=rev2, + other_ref=rev1, )) try: - response.mustcontain('%s@%s -> %s@%s' % (repo2.repo_name, rev1, repo1.repo_name, rev2)) + response.mustcontain('%s@%s -> %s@%s' % (repo1.repo_name, rev2, repo2.repo_name, rev1)) response.mustcontain("""Showing 2 commits""") response.mustcontain("""1 file changed with 2 insertions and 0 deletions""") @@ -108,9 +108,9 @@ class TestCompareController(TestController): response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) ## files - response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name)) + response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo1.repo_name, rev2, rev1, repo2.repo_name)) #swap - response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?as_form=None&other_repo=%s">[swap]</a>""" % (repo1.repo_name, rev1, rev2, repo2.repo_name)) + response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?as_form=None&other_repo=%s">[swap]</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name)) finally: RepoModel().delete(r2_id) RepoModel().delete(r1_id) @@ -147,16 +147,16 @@ class TestCompareController(TestController): rev1 = 'default' rev2 = 'default' response = self.app.get(url(controller='compare', action='index', - repo_name=repo2.repo_name, + repo_name=repo1.repo_name, org_ref_type="branch", - org_ref=rev1, - other_repo=repo1.repo_name, + org_ref=rev2, + other_repo=repo2.repo_name, other_ref_type="branch", - other_ref=rev2, + other_ref=rev1, )) try: - response.mustcontain('%s@%s -> %s@%s' % (repo2.repo_name, rev1, repo1.repo_name, rev2)) + response.mustcontain('%s@%s -> %s@%s' % (repo1.repo_name, rev2, repo2.repo_name, rev1)) response.mustcontain("""Showing 2 commits""") response.mustcontain("""1 file changed with 2 insertions and 0 deletions""") @@ -166,9 +166,9 @@ class TestCompareController(TestController): response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id)) response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id)) ## files - response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name)) + response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo1.repo_name, rev2, rev1, repo2.repo_name)) #swap - response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?as_form=None&other_repo=%s">[swap]</a>""" % (repo1.repo_name, rev1, rev2, repo2.repo_name)) + response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?as_form=None&other_repo=%s">[swap]</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name)) finally: RepoModel().delete(r2_id) RepoModel().delete(r1_id) |