X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/15b104f4ff4614aa78c01180b6a9b89dd5a1400f..918a382cad0cf9f8cbf2a47359d48773065c88f6:/test/controllers/trace_controller_test.rb diff --git a/test/controllers/trace_controller_test.rb b/test/controllers/trace_controller_test.rb index 182fe8c02..2dafa5394 100644 --- a/test/controllers/trace_controller_test.rb +++ b/test/controllers/trace_controller_test.rb @@ -550,6 +550,9 @@ class TraceControllerTest < ActionController::TestCase post :create, :params => { :trace => { :gpx_file => file, :description => "New Trace", :tagstring => "new,trace", :visibility => "trackable" } } assert_response :forbidden + # Rewind the file + file.rewind + # Now authenticated create(:user_preference, :user => user, :k => "gps.trace.visibility", :v => "identifiable") assert_not_equal "trackable", user.preferences.where(:k => "gps.trace.visibility").first.v @@ -829,6 +832,9 @@ class TraceControllerTest < ActionController::TestCase post :api_create, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" } assert_response :unauthorized + # Rewind the file + file.rewind + # Now authenticated create(:user_preference, :user => user, :k => "gps.trace.visibility", :v => "identifiable") assert_not_equal "trackable", user.preferences.where(:k => "gps.trace.visibility").first.v