<p>This is the modern way of writing controller tests, since it uses the rails middleware (among other things) and leads to more realistic tests.</p>
<p>Refs <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="583840653" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2563" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2563/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2563">#2563</a></p>
<p>If we're all happy with this, then I can refactor all the remaining controller tests in order to unblock <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="583840653" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2563" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2563/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2563">#2563</a></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/2596'>https://github.com/openstreetmap/openstreetmap-website/pull/2596</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Refactor site controller tests to inherit from ActionDispatch::IntegrationTest</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2596/files#diff-21497849d8f00507c9c8dcaf6288b136">config/routes.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2596/files#diff-8fb988e33ce23eff68f172eba4210d00">test/controllers/site_controller_test.rb</a>
(156)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2596/files#diff-f14ca9959ff06f3ca2ee6b9564866954">test/test_helper.rb</a>
(5)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2596.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2596.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2596.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2596.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2596">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKZWMNBZMGKMRUVEDTRN2ZVZANCNFSM4MN72THA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLMPJ2VESV3OIDJ4YA3RN2ZVZA5CNFSM4MN72THKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JAJPA5A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2596",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2596",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>