[openstreetmap/openstreetmap-website] Simplify GPS trace visibility levels (PR #7146)
Ruben L. Mendoza
notifications at github.com
Wed Jul 15 15:27:12 UTC 2026
@Rub21 commented on this pull request.
> + # A legacy visibility (public or private) is no longer accepted on upload
+ def test_create_legacy_visibility
+ fixture = Rails.root.join("test/gpx/fixtures/a.gpx")
+ file = Rack::Test::UploadedFile.new(fixture, "application/gpx+xml")
+ user = create(:user)
+ auth_header = bearer_authorization_header user
+
+ assert_no_difference "Trace.count" do
+ post api_traces_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "public" }, :headers => auth_header
+ end
+ assert_response :bad_request
end
Done, the test now checks both public and private. The model and helper tests also cover both legacy values now.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7146#discussion_r3588580088
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/7146/review/4705604670 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260715/9ebf3712/attachment.htm>
More information about the rails-dev
mailing list