Skip to content

Commit

Permalink
[issue-4351] hound cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Tooyosi committed Sep 2, 2024
1 parent 16e2a9c commit dedc60d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions spec/mailers/user_info_changed_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@

context "email address was changed" do
prev_email = '[email protected]'
let(:mail) { UserInfoChangedMailer.user_info_changed(user, "email", prev_email)}
let(:mail) { UserInfoChangedMailer.user_info_changed(user, 'email', prev_email)}

it 'should have the correct subject' do
expect(mail.subject).to eq("Your Zooniverse email address has been changed")
end

it 'should notify the previous mail' do
it 'notifies the previous mail' do
expect(mail.to).to include(prev_email)
end
end
Expand Down
10 changes: 5 additions & 5 deletions spec/workers/user_info_changed_mailer_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
let(:user) { create(:user) }

context 'email delivery' do
it 'should deliver the mail' do
expect{ subject.perform(user.id, "password") }.to change{ ActionMailer::Base.deliveries.count }.by(1)
it 'delivers the mail' do
expect { subject.perform(user.id, 'password') }.to change { ActionMailer::Base.deliveries.count }.by(1)
end

it 'should deliver to the right recipients' do
prev_pass = '[email protected]'
subject.perform(user.id, "email", prev_pass)
it 'delivers to the right recipients' do
let(:prev_pass) { '[email protected]' }
subject.perform(user.id, 'email', prev_pass)
mail = ActionMailer::Base.deliveries.last
expect(mail.to).to eq([user.email, prev_pass])
end
Expand Down

0 comments on commit dedc60d

Please sign in to comment.