def test_post_bulk_update_should_redirect_back_using_the_back_url_parameter
@request.session[:user_id] = 2
- post :bulk_update, :params => {:ids => [1,2], :back_url => '/time_entries'}
+ post :bulk_update, :params => {:ids => [1, 2], :back_url => '/time_entries'}
assert_response :redirect
assert_redirected_to '/time_entries'
def test_post_bulk_update_should_not_redirect_back_using_the_back_url_parameter_off_the_host
@request.session[:user_id] = 2
- post :bulk_update, :params => {:ids => [1,2], :back_url => 'http://google.com'}
+ post :bulk_update, :params => {:ids => [1, 2], :back_url => 'http://google.com'}
assert_response :redirect
assert_redirected_to :controller => 'timelog', :action => 'index', :project_id => Project.find(1).identifier
@request.session[:user_id] = 2
Role.find_by_name('Manager').remove_permission! :edit_time_entries
- post :bulk_update, :params => {:ids => [1,2]}
+ post :bulk_update, :params => {:ids => [1, 2]}
assert_response 403
end