summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFelipe Artur <fcardozo@gitlab.com>2019-07-09 15:21:10 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-07-09 15:21:10 +0000
commitbdbaebf87e95d513baaf9c3b735ba7420a1aa6aa (patch)
treeb3d27c131a0c3025571aba3c4bf7b41c39231641 /spec
parent54820ac996f29c4c6af084def7d5efdaf70b3f05 (diff)
downloadgitlab-ce-bdbaebf87e95d513baaf9c3b735ba7420a1aa6aa.tar.gz
Skip spam check for task list updates
Task list updates should not mark users action as spam on akismet.
Diffstat (limited to 'spec')
-rw-r--r--spec/services/issues/update_service_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb
index 28fa5d12d9c..468e7c286d5 100644
--- a/spec/services/issues/update_service_spec.rb
+++ b/spec/services/issues/update_service_spec.rb
@@ -480,6 +480,22 @@ describe Issues::UpdateService, :mailer do
update_issue(description: "- [x] Task 1\n- [X] Task 2")
end
+ it 'does not check for spam on task status change' do
+ params = {
+ update_task: {
+ index: 1,
+ checked: false,
+ line_source: '- [x] Task 1',
+ line_number: 1
+ }
+ }
+ service = described_class.new(project, user, params)
+
+ expect(service).not_to receive(:spam_check)
+
+ service.execute(issue)
+ end
+
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')