-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|