demarches-normaliennes/spec/mailers/welcome_mailer_spec.rb

16 lines
666 B
Ruby
Raw Normal View History

2015-12-14 16:09:20 +01:00
require 'spec_helper'
describe WelcomeMailer, type: :mailer do
describe ".welcome_email" do
let(:user) { create(:user) }
subject(:subject) { described_class.welcome_email(user) }
2016-07-26 15:05:24 +02:00
it { expect(subject.body).to match(root_url) }
it { expect(subject.body).to match(new_user_password_url) }
2015-12-14 16:09:20 +01:00
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