X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/87918595da1e1fad2ddd7aa62f9fc537dff657ff..21683db838d66d5b14da08dd5fd467fae09515d4:/test/controllers/trace_controller_test.rb?ds=inline 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