X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5682fb4d2465024639d6e0006c664f203ba773f5..bcec47680db6fd07ea9932d15bb5588e8afcb1ce:/test/controllers/redactions_controller_test.rb diff --git a/test/controllers/redactions_controller_test.rb b/test/controllers/redactions_controller_test.rb index 0bf57c310..1c2ee65b3 100644 --- a/test/controllers/redactions_controller_test.rb +++ b/test/controllers/redactions_controller_test.rb @@ -64,7 +64,7 @@ class RedactionsControllerTest < ActionController::TestCase get :new assert_response :redirect - assert_redirected_to redactions_path + assert_redirected_to :controller => "errors", :action => "forbidden" end def test_create_moderator @@ -87,7 +87,8 @@ class RedactionsControllerTest < ActionController::TestCase session[:user] = create(:user).id post :create, :params => { :redaction => { :title => "Foo", :description => "Description here." } } - assert_response :forbidden + assert_response :redirect + assert_redirected_to :controller => "errors", :action => "forbidden" end def test_destroy_moderator_empty @@ -118,7 +119,8 @@ class RedactionsControllerTest < ActionController::TestCase session[:user] = create(:user).id delete :destroy, :params => { :id => create(:redaction).id } - assert_response :forbidden + assert_response :redirect + assert_redirected_to :controller => "errors", :action => "forbidden" end def test_edit @@ -141,7 +143,7 @@ class RedactionsControllerTest < ActionController::TestCase get :edit, :params => { :id => create(:redaction).id } assert_response :redirect - assert_redirected_to(redactions_path) + assert_redirected_to :controller => "errors", :action => "forbidden" end def test_update_moderator @@ -170,6 +172,7 @@ class RedactionsControllerTest < ActionController::TestCase redaction = create(:redaction) put :update, :params => { :id => redaction.id, :redaction => { :title => "Foo", :description => "Description here." } } - assert_response :forbidden + assert_response :redirect + assert_redirected_to :controller => "errors", :action => "forbidden" end end