diff options
| author | Robert | 2017-07-10 16:19:59 +0200 |
|---|---|---|
| committer | Robert | 2017-07-10 16:19:59 +0200 |
| commit | 2da5bd656b9bbd99d9dac3bdd46ea1f75163e459 (patch) | |
| tree | be8748128ce20bd1f099d47a600d5e1827780573 /spec | |
| parent | 9041ceafc736982a2bab52cd4c2c5c3581ee711c (diff) | |
| parent | d1a055b6a2bbeae4f217fe85660a0612e22dabd1 (diff) | |
| download | chouette-core-2da5bd656b9bbd99d9dac3bdd46ea1f75163e459.tar.bz2 | |
Merge branch 'master' of github.com:af83/stif-boiv
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/jobs/mailer_job_spec.rb | 5 | ||||
| -rw-r--r-- | spec/mailers/calendar_mailer_spec.rb | 2 | ||||
| -rw-r--r-- | spec/mailers/previews/calendar_mailer_preview.rb | 9 |
3 files changed, 10 insertions, 6 deletions
diff --git a/spec/jobs/mailer_job_spec.rb b/spec/jobs/mailer_job_spec.rb deleted file mode 100644 index 363b8724a..000000000 --- a/spec/jobs/mailer_job_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'rails_helper' - -RSpec.describe MailerJob, type: :job do - pending "add some examples to (or delete) #{__FILE__}" -end diff --git a/spec/mailers/calendar_mailer_spec.rb b/spec/mailers/calendar_mailer_spec.rb index d41092461..49cc3cce8 100644 --- a/spec/mailers/calendar_mailer_spec.rb +++ b/spec/mailers/calendar_mailer_spec.rb @@ -20,7 +20,7 @@ RSpec.describe CalendarMailer, type: :mailer do end it 'should have correct body' do - key = I18n.t("mailers.calendar_mailer.#{type}.body") + key = I18n.t("mailers.calendar_mailer.#{type}.body", cal_name: calendar.name, cal_index_url: calendars_url) expect(email).to have_body_text /#{key}/ end end diff --git a/spec/mailers/previews/calendar_mailer_preview.rb b/spec/mailers/previews/calendar_mailer_preview.rb index 572c6c667..5fa108924 100644 --- a/spec/mailers/previews/calendar_mailer_preview.rb +++ b/spec/mailers/previews/calendar_mailer_preview.rb @@ -1,4 +1,13 @@ # Preview all emails at http://localhost:3000/rails/mailers/calendar_mailer class CalendarMailerPreview < ActionMailer::Preview + def created + cal = Calendar.new(name: 'test calendar', shared: true) + CalendarMailer.created(cal, User.take) + end + + def updated + cal = Calendar.new(name: 'test calendar', shared: true) + CalendarMailer.updated(cal, User.take) + end end |
