diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-01 14:03:57 +0200 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-14 14:50:32 +0200 |
commit | 994e7d135947ca162c147c5e0992a0190de22808 (patch) | |
tree | cd9ea4d93269c8597541f8c59e89a83ca2b56d2b /spec/services | |
parent | 2b82f907abf2074ac332531d6142893d081f44b9 (diff) | |
download | gitlab-ce-994e7d135947ca162c147c5e0992a0190de22808.tar.gz |
Create system notes for MR too, improve doc + clean up code
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 7 | ||||
-rw-r--r-- | spec/services/merge_requests/update_service_spec.rb | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index 0ed4c2152bb..bcce827fe71 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -144,6 +144,13 @@ describe Issues::UpdateService, :mailer do expect(note).not_to be_nil expect(note.note).to eq 'changed title from **{-Old-} title** to **{+New+} title**' end + + it 'creates system note about discussion lock' do + note = find_note('locked this issue') + + expect(note).not_to be_nil + expect(note.note).to eq 'locked this issue' + end end end diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb index a07b7ac2218..b11a1b31f32 100644 --- a/spec/services/merge_requests/update_service_spec.rb +++ b/spec/services/merge_requests/update_service_spec.rb @@ -125,6 +125,13 @@ describe MergeRequests::UpdateService, :mailer do expect(note.note).to eq 'changed target branch from `master` to `target`' end + it 'creates system note about discussion lock' do + note = find_note('locked this issue') + + expect(note).not_to be_nil + expect(note.note).to eq 'locked this issue' + end + context 'when not including source branch removal options' do before do opts.delete(:force_remove_source_branch) |