X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/420a7289a0b08eee091f6650c2e83166df3fbe69..31edc7dff6f4305366d0f93d35ba3fb1956bb71f:/test/controllers/redactions_controller_test.rb?ds=sidebyside diff --git a/test/controllers/redactions_controller_test.rb b/test/controllers/redactions_controller_test.rb index e2123f725..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 ## @@ -65,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 @@ -88,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 @@ -119,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 @@ -142,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 @@ -171,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