Add mailer Welcome

This commit is contained in:
Xavier J 2015-12-14 16:09:20 +01:00
parent a2a5d63c0d
commit a65f271a60
9 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,15 @@
require 'spec_helper'
describe WelcomeMailer, type: :mailer do
describe ".welcome_email" do
let(:user) { create(:user) }
subject(:subject) { described_class.welcome_email(user) }
it { expect(subject.body).to match('https://tps.apientreprise.fr') }
it { expect(subject.body).to match('https://tps.apientreprise.fr/users/password/new') }
it { expect(subject.body).to match(user.email) }
it { expect(subject.body).to match('Bienvenue sur la plateforme TPS') }
it { expect(subject.body).to match('Nous vous remercions de vous être inscrit sur TPS. Pour mémoire, voici quelques informations utiles :')}
it { expect(subject.subject).to eq("Création de votre compte TPS") }
end
end