summaryrefslogtreecommitdiffstats
path: root/test/functional/issue_moves_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/issue_moves_controller_test.rb')
-rw-r--r--test/functional/issue_moves_controller_test.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/functional/issue_moves_controller_test.rb b/test/functional/issue_moves_controller_test.rb
index 62593ac37..dc19ddc8d 100644
--- a/test/functional/issue_moves_controller_test.rb
+++ b/test/functional/issue_moves_controller_test.rb
@@ -41,8 +41,11 @@ class IssueMovesControllerTest < ActionController::TestCase
end
context "#create via bulk move" do
- should "allow changing the issue priority" do
+ setup do
@request.session[:user_id] = 2
+ end
+
+ should "allow changing the issue priority" do
post :create, :ids => [1, 2], :priority_id => 6
assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
@@ -50,6 +53,15 @@ class IssueMovesControllerTest < ActionController::TestCase
assert_equal 6, Issue.find(2).priority_id
end
+
+ should "allow adding a note when moving" do
+ post :create, :ids => [1, 2], :notes => 'Moving two issues'
+
+ assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
+ assert_equal 'Moving two issues', Issue.find(1).journals.last.notes
+ assert_equal 'Moving two issues', Issue.find(2).journals.last.notes
+
+ end
end