diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-23 14:57:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-23 14:57:46 +0000 |
commit | 64fc6a9b19faca58ad0087b1a1cb11f7ed910015 (patch) | |
tree | fe4e98cfab4289850ee15965ae0b04648ee90207 /spec/services/packages | |
parent | 6317794da29af0bccf95dece5b57b2be2c0977a4 (diff) | |
download | gitlab-ce-64fc6a9b19faca58ad0087b1a1cb11f7ed910015.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-ee
Diffstat (limited to 'spec/services/packages')
-rw-r--r-- | spec/services/packages/create_event_service_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/services/packages/create_event_service_spec.rb b/spec/services/packages/create_event_service_spec.rb index 55703e9127f..4db7687bb24 100644 --- a/spec/services/packages/create_event_service_spec.rb +++ b/spec/services/packages/create_event_service_spec.rb @@ -25,7 +25,7 @@ RSpec.describe Packages::CreateEventService do stub_feature_flags(collect_package_events: false) end - it 'does not create an event object' do + it 'does not create an event' do expect { subject }.not_to change { Packages::Event.count } end end @@ -43,6 +43,16 @@ RSpec.describe Packages::CreateEventService do expect(subject.event_scope).to eq(expected_scope) expect(subject.event_type).to eq(event_name) end + + context 'on a read-only instance' do + before do + allow(Gitlab::Database).to receive(:read_only?).and_return(true) + end + + it 'does not create an event' do + expect { subject }.not_to change { Packages::Event.count } + end + end end end |