[openstreetmap/openstreetmap-website] Add show user block api endpoint (PR #4240)
Anton Khorev
notifications at github.com
Sat Sep 9 12:19:50 UTC 2023
@AntonKhorev commented on this pull request.
> @@ -0,0 +1,30 @@
+require "test_helper"
+
+module Api
+ class UserBlocksControllerTest < ActionDispatch::IntegrationTest
+ def test_routes
+ assert_routing(
+ { :path => "/api/0.6/user_blocks/1", :method => :get },
+ { :controller => "api/user_blocks", :action => "show", :id => "1" }
+ )
+ assert_recognizes(
+ { :controller => "api/user_blocks", :action => "show", :id => "1", :format => "xml" },
+ { :path => "/api/0.6/user_blocks/1.xml", :method => :get }
+ )
This is where I copied it from:
https://github.com/openstreetmap/openstreetmap-website/blob/0e21afc56593eb9fce14d8cfe0984494e758c150/test/controllers/api/notes_controller_test.rb#L23
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4240#discussion_r1320553846
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4240/review/1618629474 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230909/d54d4b20/attachment.htm>
More information about the rails-dev
mailing list