aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/track_mailer_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/track_mailer_spec.rb b/spec/models/track_mailer_spec.rb
index 924749b20..4cf85c31f 100644
--- a/spec/models/track_mailer_spec.rb
+++ b/spec/models/track_mailer_spec.rb
@@ -105,6 +105,22 @@ describe TrackMailer do
end
+ describe 'delivering the email' do
+ it 'should deliver one email, with right headers' do
+ @user = mock_model(User,
+ :name_and_email => TMail::Address.address_from_name_and_email('Tippy Test', 'tippy@localhost'),
+ :url_name => 'tippy_test'
+ )
+
+ TrackMailer.deliver_event_digest(@user, []) # no items in it email for minimal test
+ deliveries = ActionMailer::Base.deliveries
+ deliveries.size.should == 1
+ mail = deliveries[0]
+
+ mail['Auto-Submitted'].to_s.should == 'auto-generated'
+ end
+ end
+
end