summaryrefslogtreecommitdiff
path: root/spec/services/todo_service_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 13:16:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 13:16:36 +0000
commit311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch)
tree07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/services/todo_service_spec.rb
parent27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff)
downloadgitlab-ce-311b0269b4eb9839fa63f80c8d7a58f32b8138a0.tar.gz
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/services/todo_service_spec.rb')
-rw-r--r--spec/services/todo_service_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/services/todo_service_spec.rb b/spec/services/todo_service_spec.rb
index 6a8e6dc8970..7103cb0b66a 100644
--- a/spec/services/todo_service_spec.rb
+++ b/spec/services/todo_service_spec.rb
@@ -1218,6 +1218,17 @@ RSpec.describe TodoService do
end
end
+ describe '#create_attention_requested_todo' do
+ let(:target) { create(:merge_request, author: author, source_project: project) }
+ let(:user) { create(:user) }
+
+ it 'creates a todo for user' do
+ service.create_attention_requested_todo(target, author, user)
+
+ should_create_todo(user: user, target: target, action: Todo::ATTENTION_REQUESTED)
+ end
+ end
+
def should_create_todo(attributes = {})
attributes.reverse_merge!(
project: project,