X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/efa37f6a837bb89b21ea3d29496fdd8135d05487..5708c25e04a3d31796771fbcb44485bf601cec8b:/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