[openstreetmap/openstreetmap-website] Simplify GPS trace visibility levels (PR #7146)
Ruben L. Mendoza
notifications at github.com
Tue Jun 30 18:30:20 UTC 2026
@Rub21 commented on this pull request.
> - auth_header = bearer_authorization_header second_user
- post api_traces_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 0 }, :headers => auth_header
- assert_response :success
- trace = Trace.find(response.body.to_i)
- assert_equal "a.gpx", trace.name
- assert_equal "New Trace", trace.description
- assert_equal %w[new trace], trace.tags.order(:tag).collect(&:tag)
- assert_equal "private", trace.visibility
- assert_not trace.inserted
- assert_equal File.new(fixture).read, trace.file.blob.download
- trace.destroy
- assert_equal "private", second_user.preferences.find_by(:k => "gps.trace.visibility").v
+ assert_no_difference "Trace.count" do
+ post api_traces_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 0 }, :headers => auth_header
+ end
+ assert_response :bad_request
I have split it into test_create_legacy_public_flag for the old public flag, and added test_create_legacy_visibility for a legacy visibility value. Just one (public), as you said.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7146#discussion_r3501032990
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/7146/review/4603089137 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260630/ca9da831/attachment.htm>
More information about the rails-dev
mailing list