summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2019-01-25 14:16:51 -0600
committerFatih Acet <acetfatih@gmail.com>2019-01-30 23:18:19 +0100
commit4e40d72acff087b80b8919c2d96707807a43ce4b (patch)
treecab65c6e7d89180ed4a165c100f996d88670d31d /spec
parentdfeb412d9f09053a601075b04cca674787c6c275 (diff)
downloadgitlab-ce-4e40d72acff087b80b8919c2d96707807a43ce4b.tar.gz
Added changelog and danger fixes
Diffstat (limited to 'spec')
-rw-r--r--spec/services/issues/update_service_spec.rb8
-rw-r--r--spec/services/task_list_toggle_service_spec.rb2
2 files changed, 6 insertions, 4 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb
index 26dc0919715..ef76e2311b1 100644
--- a/spec/services/issues/update_service_spec.rb
+++ b/spec/services/issues/update_service_spec.rb
@@ -552,7 +552,7 @@ describe Issues::UpdateService, :mailer do
context 'when a task is marked as completed' do
before do
- update_issue(update_task: { index: 1, checked: true, line_source: '- [ ] Task 1', line_number: 1})
+ update_issue(update_task: { index: 1, checked: true, line_source: '- [ ] Task 1', line_number: 1 })
end
it 'creates system note about task status change' do
@@ -568,7 +568,7 @@ describe Issues::UpdateService, :mailer do
context 'when a task is marked as incomplete' do
before do
update_issue(description: "- [x] Task 1\n- [X] Task 2")
- update_issue(update_task: { index: 2, checked: false, line_source: '- [X] Task 2', line_number: 2})
+ update_issue(update_task: { index: 2, checked: false, line_source: '- [X] Task 2', line_number: 2 })
end
it 'creates system note about task status change' do
@@ -589,7 +589,7 @@ describe Issues::UpdateService, :mailer do
it 'raises an exception' do
expect(Note.count).to eq(2)
expect do
- update_issue(update_task: { index: 2, checked: true, line_source: '- [ ] Task 2', line_number: 2})
+ update_issue(update_task: { index: 2, checked: true, line_source: '- [ ] Task 2', line_number: 2 })
end.to raise_error(ActiveRecord::StaleObjectError)
expect(Note.count).to eq(2)
end
@@ -599,7 +599,7 @@ describe Issues::UpdateService, :mailer do
before do
update_issue(description: "Paragraph\n\n- [ ] Task 1\n- [x] Task 2")
update_issue(description: "Paragraph with more words\n\n- [ ] Task 1\n- [x] Task 2")
- update_issue(update_task: { index: 2, checked: false, line_source: '- [x] Task 2', line_number: 4})
+ update_issue(update_task: { index: 2, checked: false, line_source: '- [x] Task 2', line_number: 4 })
end
it 'creates system note about task status change' do
diff --git a/spec/services/task_list_toggle_service_spec.rb b/spec/services/task_list_toggle_service_spec.rb
index facd8c193aa..8ae0e209cda 100644
--- a/spec/services/task_list_toggle_service_spec.rb
+++ b/spec/services/task_list_toggle_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe TaskListToggleService do