diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /spec/services/issuable | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'spec/services/issuable')
-rw-r--r-- | spec/services/issuable/common_system_notes_service_spec.rb | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/spec/services/issuable/common_system_notes_service_spec.rb b/spec/services/issuable/common_system_notes_service_spec.rb index daf4f68208e..217550542bb 100644 --- a/spec/services/issuable/common_system_notes_service_spec.rb +++ b/spec/services/issuable/common_system_notes_service_spec.rb @@ -32,17 +32,6 @@ RSpec.describe Issuable::CommonSystemNotesService do end end - context 'when new milestone is assigned' do - before do - milestone = create(:milestone, project: project) - issuable.milestone_id = milestone.id - - stub_feature_flags(track_resource_milestone_change_events: false) - end - - it_behaves_like 'system note creation', {}, 'changed milestone' - end - context 'with merge requests Draft note' do context 'adding Draft note' do let(:issuable) { create(:merge_request, title: "merge request") } @@ -100,32 +89,10 @@ RSpec.describe Issuable::CommonSystemNotesService do expect(event.user_id).to eq user.id end - context 'when milestone change event tracking is disabled' do - before do - stub_feature_flags(track_resource_milestone_change_events: false) - - issuable.milestone = create(:milestone, project: project) - issuable.save - end - - it 'creates a system note for milestone set' do - expect { subject }.to change { issuable.notes.count }.from(0).to(1) - expect(issuable.notes.last.note).to match('changed milestone') - end - - it 'does not create a milestone change event' do - expect { subject }.not_to change { ResourceMilestoneEvent.count } - end - end - - context 'when milestone change event tracking is enabled' do + context 'when changing milestones' do let_it_be(:milestone) { create(:milestone, project: project) } let_it_be(:issuable) { create(:issue, project: project, milestone: milestone) } - before do - stub_feature_flags(track_resource_milestone_change_events: true) - end - it 'does not create a system note for milestone set' do expect { subject }.not_to change { issuable.notes.count } end |