X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/11e97b3edb057f6f449209ca2afd169feda229a4..e78aee9585650673e686288322fa218f0f5a1692:/test/controllers/reports_controller_test.rb?ds=inline diff --git a/test/controllers/reports_controller_test.rb b/test/controllers/reports_controller_test.rb index e8f59ec5e..8374e76d9 100644 --- a/test/controllers/reports_controller_test.rb +++ b/test/controllers/reports_controller_test.rb @@ -63,10 +63,12 @@ class ReportsControllerTest < ActionDispatch::IntegrationTest category = "other" post reports_path(:report => { :category => category, - :issue => { :reportable_id => 1, :reportable_type => "User" } + :issue => { :reportable_id => target_user.id, :reportable_type => "User" } }) end - assert_response :redirect + assert_response :success + assert_template :new + assert_match(/Please provide the required details/, flash[:notice]) assert_equal 1, issue.reports.count end