Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChantal Rollison <crollison@gitlab.com>2018-05-03 00:34:05 +0300
committerChantal Rollison <crollison@gitlab.com>2018-05-03 21:18:51 +0300
commit1019dff2371b30979b33ce823abeadadad9cfab3 (patch)
tree3926d84cb32cc42a03d9cd84854d0c6ea91e6161 /spec/services/issuable
parentff77806150a0f965694d9492657e11f6891eba11 (diff)
Backport of 1481-changing-weight-values-should-trigger-system-notes
Diffstat (limited to 'spec/services/issuable')
-rw-r--r--spec/services/issuable/common_system_notes_service_spec.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/spec/services/issuable/common_system_notes_service_spec.rb b/spec/services/issuable/common_system_notes_service_spec.rb
index b8fa3e3d124..dcf4503ef9c 100644
--- a/spec/services/issuable/common_system_notes_service_spec.rb
+++ b/spec/services/issuable/common_system_notes_service_spec.rb
@@ -5,34 +5,6 @@ describe Issuable::CommonSystemNotesService do
let(:project) { create(:project) }
let(:issuable) { create(:issue) }
- shared_examples 'system note creation' do |update_params, note_text|
- subject { described_class.new(project, user).execute(issuable, [])}
-
- before do
- issuable.assign_attributes(update_params)
- issuable.save
- end
-
- it 'creates 1 system note with the correct content' do
- expect { subject }.to change { Note.count }.from(0).to(1)
-
- note = Note.last
- expect(note.note).to match(note_text)
- expect(note.noteable_type).to eq(issuable.class.name)
- end
- end
-
- shared_examples 'WIP notes creation' do |wip_action|
- subject { described_class.new(project, user).execute(issuable, []) }
-
- it 'creates WIP toggle and title change notes' do
- expect { subject }.to change { Note.count }.from(0).to(2)
-
- expect(Note.first.note).to match("#{wip_action} as a **Work In Progress**")
- expect(Note.second.note).to match('changed title')
- end
- end
-
describe '#execute' do
it_behaves_like 'system note creation', { title: 'New title' }, 'changed title'
it_behaves_like 'system note creation', { description: 'New description' }, 'changed the description'