X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e3c43e4a1a2e9ebec5bc163b689671d05311051f..563871c5a9a8140522b0c569df5c91a38528c8ce:/test/controllers/traces_controller_test.rb?ds=sidebyside diff --git a/test/controllers/traces_controller_test.rb b/test/controllers/traces_controller_test.rb index 972cbb3c3..c5f503d62 100644 --- a/test/controllers/traces_controller_test.rb +++ b/test/controllers/traces_controller_test.rb @@ -667,6 +667,17 @@ class TracesControllerTest < ActionDispatch::IntegrationTest assert_equal new_details[:visibility], trace.visibility end + # Test invalid updates + def test_update_invalid + trace = create(:trace) + + # Invalid visibility + session_for(trace.user) + put trace_path(trace, :trace => { :description => "Changed description", :tagstring => "new_tag", :visibility => "wrong" }) + assert_response :success + assert_select "title", :text => /^Editing Trace/ + end + # Test destroying a trace def test_destroy public_trace_file = create(:trace, :visibility => "public")