Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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,