X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/79207ee5948a11f920d90c9bdaba394bc4316115..399ade116adb8250bbf92efa8dfeb3ca1090c7e4:/test/controllers/redactions_controller_test.rb diff --git a/test/controllers/redactions_controller_test.rb b/test/controllers/redactions_controller_test.rb index 08f32d4d0..1c2ee65b3 100644 --- a/test/controllers/redactions_controller_test.rb +++ b/test/controllers/redactions_controller_test.rb @@ -1,5 +1,4 @@ require "test_helper" -require "redactions_controller" class RedactionsControllerTest < ActionController::TestCase ## @@ -64,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 @@ -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 @@ -140,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 @@ -169,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