assert_equal 1, Issue.find(1).tracker_id
assert_equal 2, Issue.find(2).tracker_id
end
-
+
def test_bulk_create_to_another_tracker
@request.session[:user_id] = 2
post :create, :ids => [1, 2], :new_tracker_id => 2
setup do
@request.session[:user_id] = 2
end
-
+
should "allow changing the issue priority" do
post :create, :ids => [1, 2], :priority_id => 6
assert_equal 'Moving two issues', Issue.find(2).journals.sort_by(&:id).last.notes
end
-
+
end
def test_bulk_copy_to_another_project
assert_equal issue_before_move.status_id, issue_after_move.status_id
assert_equal issue_before_move.assigned_to_id, issue_after_move.assigned_to_id
end
-
+
should "allow changing the issue's attributes" do
# Fixes random test failure with Mysql
# where Issue.all(:limit => 2, :order => 'id desc', :conditions => {:project_id => 2}) doesn't return the expected results
Issue.delete_all("project_id=2")
-
+
@request.session[:user_id] = 2
assert_difference 'Issue.count', 2 do
assert_no_difference 'Project.find(1).issues.count' do
assert_difference 'Issue.count', 1 do
post :create, :ids => [1], :copy_options => {:copy => '1'}, :notes => 'Copying one issue', :new_tracker_id => '', :assigned_to_id => 4, :status_id => 3, :start_date => '2009-12-01', :due_date => '2009-12-31'
end
-
+
issue = Issue.first(:order => 'id DESC')
assert_equal 1, issue.journals.size
journal = issue.journals.first
assert_equal 'Copying one issue', journal.notes
end
end
-
+
def test_copy_to_another_project_should_follow_when_needed
@request.session[:user_id] = 2
post :create, :ids => [1], :new_project_id => 2, :copy_options => {:copy => '1'}, :follow => '1'