allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [7/16] git commit: [#5708] ticket:262 Added test that reproduces the bug
Date Mon, 04 Feb 2013 21:27:05 GMT
[#5708] ticket:262 Added test that reproduces the bug


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

Branch: refs/heads/cj/5705
Commit: b47034765854c58459127090e38fba210af43e96
Parents: be42517
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Jan 30 10:32:04 2013 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Thu Jan 31 21:58:47 2013 +0000

----------------------------------------------------------------------
 .../forgetracker/tests/functional/test_root.py     |   23 +++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b4703476/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 7ca97eb..af8d28a 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -1222,6 +1222,29 @@ class TestFunctionalController(TrackerTestController):
                 extra_environ={'username': 'test-user'},
                 status=403)
 
+    @td.with_tool('test', 'Tickets', 'dummy')
+    def test_move_ticket_and_delete_tool(self):
+        """See [#5708] for details."""
+        # create two tickets and ensure they are viewable
+        self.new_ticket(summary='test 1')
+        self.new_ticket(summary='test 2')
+        self.app.get('/p/test/bugs/1/', status=200)  # shouldn't fail
+        self.app.get('/p/test/bugs/2/', status=200)  # shouldn't fail
+
+        # move ticket 1 to 'dummy' tracker
+        p = M.Project.query.get(shortname='test')
+        dummy_tracker = p.app_instance('dummy')
+        r = self.app.post('/p/test/bugs/1/move',
+                params={'tracker': str(dummy_tracker.config._id)}).follow()
+        assert_equal(r.request.path, '/p/test/dummy/1/')
+
+        # delete 'dummy' tracker
+        p.uninstall_app('dummy')
+
+        # remaining tickets in 'bugs' tracker should still be viewable
+        self.app.get('/p/test/bugs/2/', status=200)  # shouldn't fail
+        self.app.get('/p/test/bugs/1/', status=404)  # shouldn't fail
+
 
 class TestMilestoneAdmin(TrackerTestController):
     def _post(self, params, **kw):


Mime
View raw message