5578 |
5578 |
assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
|
5579 |
5579 |
assert_equal 'Moving two issues', Issue.find(1).journals.sort_by(&:id).last.notes
|
5580 |
5580 |
assert_equal 'Moving two issues', Issue.find(2).journals.sort_by(&:id).last.notes
|
|
5581 |
assert_equal false, Issue.find(1).journals.sort_by(&:id).last.private_notes
|
|
5582 |
assert_equal false, Issue.find(2).journals.sort_by(&:id).last.private_notes
|
|
5583 |
end
|
|
5584 |
|
|
5585 |
def test_bulk_update_with_private_notes
|
|
5586 |
@request.session[:user_id] = 2
|
|
5587 |
post :bulk_update, :params => {
|
|
5588 |
:ids => [1, 2],
|
|
5589 |
:notes => 'Moving two issues',
|
|
5590 |
:private_notes => 'true'
|
|
5591 |
}
|
|
5592 |
|
|
5593 |
assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
|
|
5594 |
assert_equal 'Moving two issues', Issue.find(1).journals.sort_by(&:id).last.notes
|
|
5595 |
assert_equal 'Moving two issues', Issue.find(2).journals.sort_by(&:id).last.notes
|
|
5596 |
assert_equal true, Issue.find(1).journals.sort_by(&:id).last.private_notes
|
|
5597 |
assert_equal true, Issue.find(2).journals.sort_by(&:id).last.private_notes
|
|
5598 |
end
|
|
5599 |
|
|
5600 |
def test_bulk_update_with_private_notes_without_set_private_notes_permission
|
|
5601 |
@request.session[:user_id] = 2
|
|
5602 |
Role.find(1).remove_permission! :set_notes_private
|
|
5603 |
|
|
5604 |
post :bulk_update, :params => {
|
|
5605 |
:ids => [1, 2],
|
|
5606 |
:notes => 'Moving two issues',
|
|
5607 |
:private_notes => 'true'
|
|
5608 |
}
|
|
5609 |
|
|
5610 |
assert_response 403
|
5581 |
5611 |
end
|
5582 |
5612 |
|
5583 |
5613 |
def test_bulk_update_parent_id
|