diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-11-23 09:55:23 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-11-24 13:26:29 +0300 |
commit | 6df22f72c6c312199c547e017ce1f947cf88e34c (patch) | |
tree | c91130ad2d0bca231dd38d359c061a4227c778c0 /spec/services/issues | |
parent | d0c0c75ca9568bc3ec00c341a6053623d85e6201 (diff) |
Rephrase some system notes to be compatible with new system note style
Diffstat (limited to 'spec/services/issues')
-rw-r--r-- | spec/services/issues/close_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/issues/move_service_spec.rb | 6 | ||||
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 28 |
3 files changed, 18 insertions, 18 deletions
diff --git a/spec/services/issues/close_service_spec.rb b/spec/services/issues/close_service_spec.rb index 4465f22a001..7a54373963e 100644 --- a/spec/services/issues/close_service_spec.rb +++ b/spec/services/issues/close_service_spec.rb @@ -62,7 +62,7 @@ describe Issues::CloseService, services: true do it 'creates system note about issue reassign' do note = issue.notes.last - expect(note.note).to include "Status changed to closed" + expect(note.note).to include "closed" end it 'marks todos as done' do diff --git a/spec/services/issues/move_service_spec.rb b/spec/services/issues/move_service_spec.rb index f0ded06b785..c7de0d0c534 100644 --- a/spec/services/issues/move_service_spec.rb +++ b/spec/services/issues/move_service_spec.rb @@ -81,11 +81,11 @@ describe Issues::MoveService, services: true do end it 'adds system note to old issue at the end' do - expect(old_issue.notes.last.note).to match /^Moved to/ + expect(old_issue.notes.last.note).to start_with 'moved to' end it 'adds system note to new issue at the end' do - expect(new_issue.notes.last.note).to match /^Moved from/ + expect(new_issue.notes.last.note).to start_with 'moved from' end it 'closes old issue' do @@ -151,7 +151,7 @@ describe Issues::MoveService, services: true do end it 'adds a system note about move after rewritten notes' do - expect(system_notes.last.note).to match /^Moved from/ + expect(system_notes.last.note).to match /^moved from/ end it 'preserves orignal author of comment' do diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index 4777a90639e..4c878d748c0 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -91,24 +91,24 @@ describe Issues::UpdateService, services: true do end it 'creates system note about issue reassign' do - note = find_note('Reassigned to') + note = find_note('assigned to') expect(note).not_to be_nil - expect(note.note).to include "Reassigned to \@#{user2.username}" + expect(note.note).to include "assigned to #{user2.to_reference}" end it 'creates system note about issue label edit' do - note = find_note('Added ~') + note = find_note('added ~') expect(note).not_to be_nil - expect(note.note).to include "Added ~#{label.id} label" + expect(note.note).to include "added #{label.to_reference} label" end it 'creates system note about title change' do - note = find_note('Changed title:') + note = find_note('changed title') expect(note).not_to be_nil - expect(note.note).to eq 'Changed title: **{-Old-} title** → **{+New+} title**' + expect(note.note).to eq 'changed title from **{-Old-} title** to **{+New+} title**' end end end @@ -128,10 +128,10 @@ describe Issues::UpdateService, services: true do it 'creates system note about confidentiality change' do update_issue(confidential: true) - note = find_note('Made the issue confidential') + note = find_note('made the issue confidential') expect(note).not_to be_nil - expect(note.note).to eq 'Made the issue confidential' + expect(note.note).to eq 'made the issue confidential' end it 'executes confidential issue hooks' do @@ -269,8 +269,8 @@ describe Issues::UpdateService, services: true do before { update_issue(description: "- [x] Task 1\n- [X] Task 2") } it 'creates system note about task status change' do - note1 = find_note('Marked the task **Task 1** as completed') - note2 = find_note('Marked the task **Task 2** as completed') + note1 = find_note('marked the task **Task 1** as completed') + note2 = find_note('marked the task **Task 2** as completed') expect(note1).not_to be_nil expect(note2).not_to be_nil @@ -284,8 +284,8 @@ describe Issues::UpdateService, services: true do end it 'creates system note about task status change' do - note1 = find_note('Marked the task **Task 1** as incomplete') - note2 = find_note('Marked the task **Task 2** as incomplete') + note1 = find_note('marked the task **Task 1** as incomplete') + note2 = find_note('marked the task **Task 2** as incomplete') expect(note1).not_to be_nil expect(note2).not_to be_nil @@ -299,7 +299,7 @@ describe Issues::UpdateService, services: true do end it 'does not create a system note' do - note = find_note('Marked the task **Task 2** as incomplete') + note = find_note('marked the task **Task 2** as incomplete') expect(note).to be_nil end @@ -312,7 +312,7 @@ describe Issues::UpdateService, services: true do end it 'does not create a system note referencing the position the old item' do - note = find_note('Marked the task **Two** as incomplete') + note = find_note('marked the task **Two** as incomplete') expect(note).to be_nil end |