- assert_not_equal "trackable", user.preferences.where(:k => "gps.trace.visibility").first.v
- basic_authorization user.display_name, "test"
- post :create, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" }
+ assert_not_equal "trackable", user.preferences.find_by(:k => "gps.trace.visibility").v
+ auth_header = basic_authorization_header user.display_name, "test"
+ post gpx_create_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" }, :headers => auth_header