Permalink
Browse files

fixed mailer spec

  • Loading branch information...
alexandrz committed Dec 2, 2018
1 parent 2efc74f commit 8a7464f5f05846cb2a1b8a952a397a6f10256ad0
Showing with 11 additions and 2 deletions.
  1. +11 −2 spec/mailers/user_mailer_spec.rb
@@ -2,7 +2,16 @@
describe UserMailer do
describe 'new_tip' do
let(:user) { mock_model User, name: 'kd', email: 'kd.engineer@yahoo.co.in', display_name: 'kuldeep aggarwal', login_token: 'my login token', balance: 10 }
let(:user) do
mock_model(
User,
name: 'kd',
email: 'kd.engineer@yahoo.co.in',
display_name: 'kuldeep aggarwal',
login_token: 'my login token',
balance: 10
)
end
let(:project) { mock_model Project, full_name: 'logger-extension' }
let(:tip) { mock_model Tip, amount: 0.0001, project: project }
let(:mail) { UserMailer.new_tip(user, tip) }
@@ -27,7 +36,7 @@
expected_text = [
'Please, log in and tell us your bitcoin address to get it.</p>',
'<p>Your current balance is <nobr>0.00000010 Ƀ</nobr>'
].join("\n")
].join("\r\n")
expect(mail.body.encoded).to match expected_text
end

0 comments on commit 8a7464f

Please sign in to comment.