demarches-normaliennes/spec/mailers/welcome_mailer_spec.rb

16 lines
716 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) }
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