Skip to content

Commit

Permalink
[issue-4351] renaming test variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Tooyosi committed Sep 4, 2024
1 parent 554d4a7 commit 7506705
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/workers/user_info_changed_mailer_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
RSpec.describe UserInfoChangedMailerWorker do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:prev_pass) { 'oldpassword@example.com' }
let(:prev_email) { 'oldemaild@example.com' }

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

it 'delivers to the right recipients' do
subject.perform(user.id, 'email', prev_pass)
subject.perform(user.id, 'email', prev_email)
mail = ActionMailer::Base.deliveries.last
expect(mail.to).to eq([user.email, prev_pass])
expect(mail.to).to eq([user.email, prev_email])
end
end

Expand Down

0 comments on commit 7506705

Please sign in to comment.