<p dir="auto">The only non-resourceful thing in the elements API is <code class="notranslate">redact</code> action. However before I can do anything with it I need to take care of tests.</p>
<p dir="auto">You'd expect controller action tests to first set up the state of the elements, then perform the request and finally check the response and the new state. Unfortunately tests for redacting/unredacting element versions don't do that. Instead of checking the state after the action they do new show/index requests and check responses to those. This is double-checking show/index actions for redacted/unredacted states which is already done. But what's worse, if I'm to move (un)redacting to a different controller, the test would check actions of different controllers. They'll become integration tests.</p>
<p dir="auto">But wait, some would-be integration tests already exist for different actions. You can see "FIXME: Move this test to being an integration test" on <code class="notranslate">test_show</code> in <code class="notranslate">old_nodes_controller_test.rb</code>. And you can see <code class="notranslate">with_controller</code> inside the tests. Also there's a similar situation in old ways controller.</p>
<p dir="auto">This PR moves <code class="notranslate">test_show</code> tests to integration tests and replaces them with tests that just check the show action.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5645'>https://github.com/openstreetmap/openstreetmap-website/pull/5645</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/commits/1da870fd48127e7fafc59a1c59268c549ba724a3" class="commit-link">1da870f</a>  Move api node version test to integration tests</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/commits/b0afd3453a4a2f2baa7f46f49b213729bbec89ee" class="commit-link">b0afd34</a>  Test api old node show action without integration</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/commits/0b802240dfe83528f185b418876ca804233cff5c" class="commit-link">0b80224</a>  Move api way version test to integration tests</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/commits/70d7be4cb93efa05aae863369ae92269fbb9683b" class="commit-link">70d7be4</a>  Test api old way show action without integration</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/commits/eef9e5fbf1f9e5f35af4ab583c1cdc2d6ea1eef0" class="commit-link">eef9e5f</a>  Remove unused api old relation test code</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/files">5 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/files#diff-7ee3168144cba950374d481967d27d39db360d6dfb366aa9033b42f32cb98256">test/controllers/api/old_nodes_controller_test.rb</a>
    (202)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/files#diff-8e8190e84ed61c4b7d4457b6d491daae4fbe436431cd5985b364592d52271c68">test/controllers/api/old_relations_controller_test.rb</a>
    (43)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/files#diff-1d1ef6db64a5caea6f9e55e4038ed133a740c05263a5863c797fbfe26adc533e">test/controllers/api/old_ways_controller_test.rb</a>
    (61)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/files#diff-0d30919fc5b0bd18534f33c7825e2481278395597af471f471dd9739ef7c7231">test/integration/node_versions_test.rb</a>
    (194)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5645/files#diff-c4e6540ba540028a4b4707343600ea2f2d7b6910e7ad505b27648a5fc9c6f4da">test/integration/way_versions_test.rb</a>
    (52)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5645.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5645.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5645.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5645.diff</a></li>
</ul>

<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/5645">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKZXZUZ7YO2DSTBFFL2PD65XAVCNFSM6AAAAABW3MMRXSVHI2DSMVQWIX3LMV43ASLTON2WKOZSHA2DGNBVHE3TKNA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOIJTKTBV4QH4DDQ4D2PD65XA5CNFSM6AAAAABW3MMRXSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKS66AVI.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/5645</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/5645",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5645",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>