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
1 changed files with 8 additions and 0 deletions

View File

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