From ccaf49acd5a48eb402d633dc50c0dd05d5cdb1c1 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Fri, 14 Apr 2023 15:55:08 +0200 Subject: [PATCH] Update action_mailer.yml configuration and adapt specs --- config/action_mailer.yml.ci | 2 +- config/action_mailer.yml.example | 9 ++++++--- spec/mailers/user_mailer_spec.rb | 10 +++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/config/action_mailer.yml.ci b/config/action_mailer.yml.ci index 7e407bdb..f2d9669e 100644 --- a/config/action_mailer.yml.ci +++ b/config/action_mailer.yml.ci @@ -1,6 +1,6 @@ test: default_options: - from: codeocean@hpi.de + from: codeocean@openhpi.de default_url_options: host: localhost delivery_method: :test diff --git a/config/action_mailer.yml.example b/config/action_mailer.yml.example index 43a279dc..a762e72f 100644 --- a/config/action_mailer.yml.example +++ b/config/action_mailer.yml.example @@ -1,19 +1,22 @@ default: &default default_options: - from: codeocean@hpi.de - delivery_method: :smtp + from: codeocean@openhpi.de development: <<: *default default_url_options: host: localhost port: 7000 - delivery_method: :test + # Open mails in the browser (not compatible with Vagrant) + delivery_method: :letter_opener + # Print mails to the console + # delivery_method: :test production: <<: *default default_url_options: host: CHANGE_ME + delivery_method: :smtp test: <<: *default diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index e881a802..3a5bc349 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -14,7 +14,7 @@ describe UserMailer do end it 'sets the correct sender' do - expect(mail.from).to include('codeocean@hpi.de') + expect(mail.from).to include('codeocean@openhpi.de') end it 'sets the correct subject' do @@ -45,7 +45,7 @@ describe UserMailer do end it 'sets the correct sender' do - expect(mail.from).to include('codeocean@hpi.de') + expect(mail.from).to include('codeocean@openhpi.de') end it 'sets the correct subject' do @@ -69,7 +69,7 @@ describe UserMailer do let(:mail) { described_class.got_new_comment(request_for_comment.comments.first, request_for_comment, commenting_user).deliver_now } it 'sets the correct sender' do - expect(mail.from).to include('codeocean@hpi.de') + expect(mail.from).to include('codeocean@openhpi.de') end it 'sets the correct subject' do @@ -123,7 +123,7 @@ describe UserMailer do let(:mail) { described_class.got_new_comment_for_subscription(request_for_comment.comments.first, subscription, from_user).deliver_now } it 'sets the correct sender' do - expect(mail.from).to include('codeocean@hpi.de') + expect(mail.from).to include('codeocean@openhpi.de') end it 'sets the correct subject' do @@ -176,7 +176,7 @@ describe UserMailer do let(:mail) { described_class.send_thank_you_note(request_for_comment, receiver).deliver_now } it 'sets the correct sender' do - expect(mail.from).to include('codeocean@hpi.de') + expect(mail.from).to include('codeocean@openhpi.de') end it 'sets the correct subject' do