add a spec for never emailing the ghost user

This commit is contained in:
http://jneen.net/ 2017-08-09 23:48:37 -07:00
parent 7416fbb398
commit b5809822b1

View file

@ -87,6 +87,14 @@ describe NotificationService, :mailer do
it 'sends email to key owner' do it 'sends email to key owner' do
expect { notification.new_key(key) }.to change { ActionMailer::Base.deliveries.size }.by(1) expect { notification.new_key(key) }.to change { ActionMailer::Base.deliveries.size }.by(1)
end end
it 'never emails the ghost user' do
key.user = User.ghost
notification.new_key(key)
should_not_email_anyone
end
end end
end end