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

users_with_pending_todos_finder_spec.rb « finders « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 565b65fbefe536156737824fbcef91b8fac55be9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe UsersWithPendingTodosFinder do
  describe '#execute' do
    it 'returns the users for all pending todos of a target' do
      issue = create(:issue)
      note = create(:note)
      todo = create(:todo, :pending, target: issue)

      create(:todo, :pending, target: note)

      users = described_class.new(issue).execute

      expect(users).to eq([todo.user])
    end
  end
end