diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /spec/lib/gitlab/email | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/lib/gitlab/email')
-rw-r--r-- | spec/lib/gitlab/email/handler/create_note_handler_spec.rb | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb index 07b8070be30..ef448ee96a4 100644 --- a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb +++ b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb @@ -65,24 +65,15 @@ RSpec.describe Gitlab::Email::Handler::CreateNoteHandler do end end - [true, false].each do |state_tracking_enabled| - context "and current user can update noteable #{state_tracking_enabled ? 'enabled' : 'disabled'}" do - before do - stub_feature_flags(track_resource_state_change_events: state_tracking_enabled) - - project.add_developer(user) - end + context "and current user can update noteable" do + before do + project.add_developer(user) + end - it 'does not raise an error' do - if state_tracking_enabled - expect { receiver.execute }.to change { noteable.resource_state_events.count }.by(1) - else - # One system note is created for the 'close' event - expect { receiver.execute }.to change { noteable.notes.count }.by(1) - end + it 'does not raise an error' do + expect { receiver.execute }.to change { noteable.resource_state_events.count }.by(1) - expect(noteable.reload).to be_closed - end + expect(noteable.reload).to be_closed end end end |