X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6ca22de4f2c68e4b14a6e2f0938a8657c33adc31..bcec47680db6fd07ea9932d15bb5588e8afcb1ce:/test/controllers/redactions_controller_test.rb?ds=inline diff --git a/test/controllers/redactions_controller_test.rb b/test/controllers/redactions_controller_test.rb index fa56814b2..1c2ee65b3 100644 --- a/test/controllers/redactions_controller_test.rb +++ b/test/controllers/redactions_controller_test.rb @@ -63,7 +63,8 @@ class RedactionsControllerTest < ActionController::TestCase session[:user] = create(:user).id get :new - assert_response :forbidden + assert_response :redirect + assert_redirected_to :controller => "errors", :action => "forbidden" end def test_create_moderator @@ -86,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 @@ -117,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 @@ -139,7 +142,8 @@ class RedactionsControllerTest < ActionController::TestCase session[:user] = create(:user).id get :edit, :params => { :id => create(:redaction).id } - assert_response :forbidden + assert_response :redirect + assert_redirected_to :controller => "errors", :action => "forbidden" end def test_update_moderator @@ -168,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