incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [1/4] git commit: [#7069] ticket:527 Add test for merge request page
Date Tue, 11 Feb 2014 05:13:45 GMT
Updated Branches:
  refs/heads/master 52ad1f406 -> 1ad33e158


[#7069] ticket:527 Add test for merge request page


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

Branch: refs/heads/master
Commit: 1ad33e1589d1a3df112f328b9ffb31da23a18a0f
Parents: 2b45973
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Thu Feb 6 13:56:43 2014 +0400
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Feb 11 05:13:08 2014 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1ad33e15/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 c9d296c..e4ccc51 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -537,6 +537,20 @@ class TestFork(_TestCase):
         assert 'git fetch git://git.localhost/p/test2/code master' in merge_instructions
         assert 'git merge {}'.format(c_id) in merge_instructions
 
+    def test_merge_request_with_deleted_repo(self):
+        self._request_merge()
+        h.set_context('test2', 'code', neighborhood='Projects')
+        c.app.repo.delete()
+        ThreadLocalORMSession.flush_all()
+
+        r = self.app.get('/p/test/src-git/merge-requests/')
+        assert '<i>(deleted)</i>' in r
+
+        r = self.app.get('/p/test/src-git/merge-requests/1/')
+        assert '''Original repository by
+      <a href="/u/test-admin/">Test Admin</a>
+      is deleted''' in r, r
+
     def test_merge_request_list_view(self):
         r, mr_num = self._request_merge()
         r = self.app.get('/p/test/src-git/merge-requests/')


Mime
View raw message