diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-08-09 23:48:37 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-08-11 16:02:06 -0700 |
commit | b5809822b13ac916ef3ea7691757725be147ade8 (patch) | |
tree | addafe36f8e43bb5a85d2fbe3565c407c4e830ac /spec/services | |
parent | 7416fbb398e21cf6931265f7f95f97f5fe73e187 (diff) | |
download | gitlab-ce-b5809822b13ac916ef3ea7691757725be147ade8.tar.gz |
add a spec for never emailing the ghost user
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/notification_service_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index b6110da83b5..bed74b4a900 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -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 |