diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/track_mailer_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/track_mailer_spec.rb b/spec/models/track_mailer_spec.rb index 21611a58d..1bf77dab5 100644 --- a/spec/models/track_mailer_spec.rb +++ b/spec/models/track_mailer_spec.rb @@ -133,6 +133,13 @@ describe TrackMailer do TrackMailer.alert_tracks end + it 'should not ask for any daily track things for the user if they have receive_email_alerts off but could otherwise be emailed' do + @user.stub(:should_be_emailed?).and_return(true) + @user.stub(:receive_email_alerts).and_return(false) + expected_conditions = [ "tracking_user_id = ? and track_medium = ?", @user.id, 'email_daily' ] + TrackThing.should_not_receive(:find).with(:all, :conditions => expected_conditions).and_return([]) + TrackMailer.alert_tracks + end it 'should not set the no_xapian_reindex flag on the user' do @user.should_not_receive(:no_xapian_reindex=).with(true) |