<p></p>
<p><b>@gravitystorm</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3147#discussion_r600512807">test/controllers/sessions_controller_test.rb</a>:</p>
<pre style='color:#555'>> +    )
+    assert_recognizes(
+      { :controller => "sessions", :action => "destroy", :format => "html" },
+      { :path => "/logout.html", :method => :get }
+    )
+  end
+
+  def test_login
+    user = create(:user)
+
+    get login_path
+    assert_response :redirect
+    assert_redirected_to login_path(:cookie_test => true)
+    follow_redirect!
+    assert_response :success
+    assert_template "sessions/new"
</pre>
<p>This can go either way. The trouble with <code>assert_template "new"</code> is that it matches any template named <code>new</code> - it's not scoped to the controller under test. So if you end up rendering e.g. "users/new" somehow, the test will still pass.</p>
<p>So two choices:</p>
<ul>
<li>Keep as-is, to ensure we are rendering the sign-in form and not e.g. the user registration form.</li>
<li>Remove the scoping, to be consistent with all our other tests, and accept that the risk is minimal.</li>
</ul>
<p>I'm happy either way.</p>

<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/3147#discussion_r600512807">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLI2TQEUV4BO2ED5ADLTFHXF7ANCNFSM4ZXIWR5A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLI664P6QL6FGAJL5I3TFHXF7A5CNFSM4ZXIWR5KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOETYOAWQ.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/3147#discussion_r600512807",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3147#discussion_r600512807",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>