diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 21:08:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 21:08:05 +0300 |
commit | 184c2ced0761bd8dd7032619d16d3983fed7944a (patch) | |
tree | cc82b32ee7c1797509da3cf384617e4ffa2e1733 /spec/models/release_spec.rb | |
parent | 238d22c07218adf2b8f3db630ee8b74ca6f29df5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/release_spec.rb')
-rw-r--r-- | spec/models/release_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/models/release_spec.rb b/spec/models/release_spec.rb index 64799421eb6..0aac325c2b2 100644 --- a/spec/models/release_spec.rb +++ b/spec/models/release_spec.rb @@ -109,4 +109,24 @@ RSpec.describe Release do end end end + + describe '#notify_new_release' do + context 'when a release is created' do + it 'instantiates NewReleaseWorker to send notifications' do + expect(NewReleaseWorker).to receive(:perform_async) + + create(:release) + end + end + + context 'when a release is updated' do + let!(:release) { create(:release) } + + it 'does not send any new notification' do + expect(NewReleaseWorker).not_to receive(:perform_async) + + release.update!(description: 'new description') + end + end + end end |