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/finders/pending_todos_finder_spec.rb')
-rw-r--r--spec/finders/pending_todos_finder_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/finders/pending_todos_finder_spec.rb b/spec/finders/pending_todos_finder_spec.rb
index f317d8b1633..4f4862852f4 100644
--- a/spec/finders/pending_todos_finder_spec.rb
+++ b/spec/finders/pending_todos_finder_spec.rb
@@ -75,5 +75,15 @@ RSpec.describe PendingTodosFinder do
expect(todos).to contain_exactly(todo1, todo2)
end
+
+ it 'supports retrieving of todos for a specific action' do
+ todo = create(:todo, :pending, user: user, target: issue, action: Todo::MENTIONED)
+
+ create(:todo, :pending, user: user, target: issue, action: Todo::ASSIGNED)
+
+ todos = described_class.new(users, action: Todo::MENTIONED).execute
+
+ expect(todos).to contain_exactly(todo)
+ end
end
end