Skip to content

Commit

Permalink
Updating tests to not depend on mail send override
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisortman committed Nov 16, 2016
1 parent 8e07b0b commit dec1cf8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spec/mailers/notifier/get_a_cost_estimate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
service_request.sub_service_requests.first,
audit) }
it 'should display correct subject' do
expect(mail).to have_subject("#{service_request.protocol.id} - [Test - EMAIL TO glennj@musc.edu] SPARCRequest service request")
expect(mail).to have_subject("#{service_request.protocol.id} - SPARCRequest service request")
end

# Expected service provider message is defined under get_a_cost_estimate_service_provider_admin_message
Expand Down
2 changes: 1 addition & 1 deletion spec/mailers/notifier/submitted_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
service_request.protocol.sub_service_requests.first,
audit) }
it 'should display correct subject' do
expect(mail).to have_subject("#{service_request.protocol.id} - [Test - EMAIL TO glennj@musc.edu] SPARCRequest service request")
expect(mail).to have_subject("#{service_request.protocol.id} - SPARCRequest service request")
end
# Expected service provider message is defined under submitted_service_provider_and_admin_message
it 'should display service provider intro message, conclusion, link, and should not display acknowledgments' do
Expand Down
8 changes: 4 additions & 4 deletions spec/mailers/survey_notification_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#ensure that the subject is correct
it 'renders the subject' do
expect(mail).to have_subject("[Test - EMAIL TO catesa@musc.edu AND CC TO amcates@gmail.com, catesa@musc.edu] System satisfaction survey completed in SPARCRequest")
expect(mail).to have_subject("System satisfaction survey completed in SPARCRequest")
end

#ensure that the receiver is correct
Expand All @@ -55,7 +55,7 @@

#ensure that the sender is correct
it 'renders the sender email' do
expect(mail).to deliver_to(DEFAULT_MAIL_TO)
expect(mail).to deliver_to(identity.email)
end

#ensure that the e-mail body is correct
Expand All @@ -75,12 +75,12 @@

#ensure that the subject is correct
it 'renders the subject' do
expect(mail).to have_subject("[Test - EMAIL TO nobody@nowhere.com] SPARCRequest Survey Notification")
expect(mail).to have_subject("SPARCRequest Survey Notification")
end

#ensure that the receiver is correct
it 'renders the receiver email' do
expect(mail).to deliver_to(DEFAULT_MAIL_TO)
expect(mail).to deliver_to(identity.email)
end

#ensure that the sender is correct
Expand Down

0 comments on commit dec1cf8

Please sign in to comment.