X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/f02c753cc4ab882537ac75065c6c65605e8dc9fe..4e138f6bf3677f220e2d2d76ec1bd9004c272ab4:/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