diff --git a/app/mailers/welcome_mailer.rb b/app/mailers/welcome_mailer.rb deleted file mode 100644 index 65b309eda..000000000 --- a/app/mailers/welcome_mailer.rb +++ /dev/null @@ -1,8 +0,0 @@ -class WelcomeMailer < ApplicationMailer - def welcome_email(user) - @user = user - - mail(to: user.email, - subject: "Création de votre compte demarches-simplifiees.fr") - end -end diff --git a/app/views/welcome_mailer/welcome_email.text.erb b/app/views/welcome_mailer/welcome_email.text.erb deleted file mode 100644 index 46de521d3..000000000 --- a/app/views/welcome_mailer/welcome_email.text.erb +++ /dev/null @@ -1,14 +0,0 @@ -Bienvenue sur demarches-simplifiees.fr, - -Nous vous remercions de vous être inscrit sur demarches-simplifiees.fr. Pour mémoire, voici quelques informations utiles : - - URL : <%= root_url %> - Login : <%= @user.email %> - -Oubli de mot de passe, pas de problème : - - <%= new_user_password_url %> - -Bonne journée, - -L'équipe demarches-simplifiees.fr diff --git a/spec/controllers/users/commentaires_controller_spec.rb b/spec/controllers/users/commentaires_controller_spec.rb index c8883c1ab..6bb7119cc 100644 --- a/spec/controllers/users/commentaires_controller_spec.rb +++ b/spec/controllers/users/commentaires_controller_spec.rb @@ -46,7 +46,6 @@ describe Users::CommentairesController, type: :controller do it 'Notification email is not send' do expect(NotificationMailer).not_to receive(:new_answer) - expect(WelcomeMailer).not_to receive(:deliver_now!) subject end diff --git a/spec/mailers/welcome_mailer_spec.rb b/spec/mailers/welcome_mailer_spec.rb deleted file mode 100644 index 3a1f187c8..000000000 --- a/spec/mailers/welcome_mailer_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -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(root_url) } - it { expect(subject.body).to match(new_user_password_url) } - it { expect(subject.body).to match(user.email) } - it { expect(subject.body).to match('Bienvenue sur demarches-simplifiees.fr') } - it { expect(subject.body).to match('Nous vous remercions de vous être inscrit sur demarches-simplifiees.fr. Pour mémoire, voici quelques informations utiles :') } - - it { expect(subject.subject).to eq("Création de votre compte demarches-simplifiees.fr") } - end -end