FEATURE: add referrer never tag to password reset page
This commit is contained in:
parent
15b5fddd49
commit
0599bd0154
|
@ -49,6 +49,7 @@
|
|||
</div>
|
||||
|
||||
<%- content_for(:no_ember_head) do %>
|
||||
<meta name="referrer" content="never">
|
||||
<%= script "ember_jquery" %>
|
||||
<%= render_google_universal_analytics_code %>
|
||||
<%- end %>
|
||||
|
|
|
@ -237,6 +237,18 @@ describe UsersController do
|
|||
end
|
||||
|
||||
context 'valid token' do
|
||||
context 'when rendered' do
|
||||
render_views
|
||||
|
||||
it 'renders referrer never on get requests' do
|
||||
user = Fabricate(:user, auth_token: SecureRandom.hex(16))
|
||||
token = user.email_tokens.create(email: user.email).token
|
||||
get :password_reset, token: token
|
||||
|
||||
expect(response.body).to include('<meta name="referrer" content="never">')
|
||||
end
|
||||
end
|
||||
|
||||
it 'returns success' do
|
||||
user = Fabricate(:user, auth_token: SecureRandom.hex(16))
|
||||
token = user.email_tokens.create(email: user.email).token
|
||||
|
|
Loading…
Reference in New Issue