<p></p>
<p><b>@tomhughes</b> commented on this pull request.</p>
<p dir="auto">Should we be adding JSON output as well?</p><hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4240#discussion_r1320139627">test/controllers/api/user_blocks_controller_test.rb</a>:</p>
<pre style='color:#555'>> @@ -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 }
+ )
</pre>
<p dir="auto">We don't normally make the XML case explicit like that though I guess maybe we should have implicit and explicit cases for it but looking at other API controller tests at the moment only the JSON ones are explicit.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4240#pullrequestreview-1617936377">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJ2K3OC67CH3FVSZV3XZNHAZANCNFSM6AAAAAA4QM5MQE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMPEJVNM6DA3VADFRTXZNHAZA5CNFSM6AAAAAA4QM5MQGWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTTAN677S.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4240/review/1617936377</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4240#pullrequestreview-1617936377",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4240#pullrequestreview-1617936377",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>