add a spec for never emailing the ghost user
This commit is contained in:
parent
7416fbb398
commit
b5809822b1
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue