summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-15 14:31:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-15 14:31:19 +0000
commit7d57833740bb546753d6d908ee082e8268044fa3 (patch)
tree95aeec83f8844a52ad1f60aefd902ac8177ffab6 /test
parent63c86758876dbfeef745935b68f8bb529e6df1ed (diff)
downloadredmine-7d57833740bb546753d6d908ee082e8268044fa3.tar.gz
redmine-7d57833740bb546753d6d908ee082e8268044fa3.zip
Adds a 'Move and follow' button on Move/Copy view to be redirected to the created issue(s) rather than the source project issue list (#1847).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3063 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 1cff860b4..75da3c0c3 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -968,6 +968,12 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 2, Issue.find(1).project_id
end
+ def test_move_one_issue_to_another_project_should_follow_when_needed
+ @request.session[:user_id] = 2
+ post :move, :id => 1, :new_project_id => 2, :follow => '1'
+ assert_redirected_to '/issues/1'
+ end
+
def test_bulk_move_to_another_project
@request.session[:user_id] = 2
post :move, :ids => [1, 2], :new_project_id => 2
@@ -997,6 +1003,13 @@ class IssuesControllerTest < ActionController::TestCase
end
assert_redirected_to 'projects/ecookbook/issues'
end
+
+ def test_copy_to_another_project_should_follow_when_needed
+ @request.session[:user_id] = 2
+ post :move, :ids => [1], :new_project_id => 2, :copy_options => {:copy => '1'}, :follow => '1'
+ issue = Issue.first(:order => 'id DESC')
+ assert_redirected_to :controller => 'issues', :action => 'show', :id => issue
+ end
def test_context_menu_one_issue
@request.session[:user_id] = 2