allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [4/7] git commit: [#5730] ticket:265 Test for moving ticket with comments
Date Tue, 05 Feb 2013 17:26:28 GMT
[#5730] ticket:265 Test for moving ticket with comments


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

Branch: refs/heads/master
Commit: de6059da2105e4147281239aed08005adfcad449
Parents: 1e15091
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Feb 4 10:58:01 2013 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Tue Feb 5 17:26:05 2013 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/de6059da/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 1289bdf..dde9afc 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -1305,6 +1305,27 @@ class TestFunctionalController(TrackerTestController):
             assert attach.app_config_id == app_config_id
             assert attach.url() in r
 
+    @td.with_tool('test', 'Tickets', 'dummy')
+    def test_move_ticket_comments(self):
+        """Comments should move along with the ticket"""
+        self.new_ticket(summary='test ticket')
+        r = self.app.get('/p/test/bugs/1/')
+        field_name = None  # comment text textarea name
+        for name, field in r.forms[2].fields.iteritems():
+            if field[0].tag == 'textarea':
+                field_name = name
+        assert field_name, "Can't find comment field"
+        r.forms[2].fields[field_name][0].value = 'I am comment'
+        r.forms[2].submit()
+        r = self.app.get('/p/test/bugs/1/')
+        assert_in('I am comment', r)
+
+        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/')
+        assert_in('I am comment', r)
 
 
 class TestMilestoneAdmin(TrackerTestController):


Mime
View raw message