Commit 27c32a5e

mo khan <mo@mokhan.ca>
2014-09-18 17:48:08
fix broken test and add link to copy and paste.
1 parent 5322fe1
Changed files (2)
app/views/password_reset_mailer/send_password_reset_instructions_to.html.erb
@@ -1,12 +1,14 @@
-<p>Hello <%= @user.email %>!</p>
+<p>Hello <%= @user.name %>!</p>
 
 <p>A requested has been made to change your password on CakeSide.com, and you can do this through the link below.</p>
 
 <p><%= link_to 'Change my password', edit_password_url(@user.reset_password_token, protocol: 'https') %></p>
 
+<p>or copy and paste the following link into your browsers address bar.</p>
+<%= edit_password_url(@user.reset_password_token, protocol: 'https') %>
+
 <p>If you didn't request this, please ignore this email.</p>
 <p>Your password won't change until you access the link above and create a new one.</p>
-<br/>
 <p>Regards,</p>
 <p>The CakeSide Team</p>
 <p>Your security and privacy is important to us so please <%= link_to "visit us", root_url(protocol: 'https') %> if you have any questions?</p>
spec/mailers/password_reset_mailer_spec.rb
@@ -2,7 +2,7 @@ require "rails_helper"
 
 describe PasswordResetMailer do
   describe '#send_password_reset_instructions_to' do
-    let(:user) { build(:user) }
+    let(:user) { build(:user, reset_password_token: SecureRandom.hex(32)) }
     let(:mail) { PasswordResetMailer.send_password_reset_instructions_to(user) }
 
     it "adds a subject" do