From 737684a392db1178770ad5b1d20b64386aadcac5 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 12 Aug 2020 03:10:17 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/lib/gitlab/issuables_count_for_state_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'spec/lib/gitlab/issuables_count_for_state_spec.rb') diff --git a/spec/lib/gitlab/issuables_count_for_state_spec.rb b/spec/lib/gitlab/issuables_count_for_state_spec.rb index 1c186a8e6ca..d96152e47ea 100644 --- a/spec/lib/gitlab/issuables_count_for_state_spec.rb +++ b/spec/lib/gitlab/issuables_count_for_state_spec.rb @@ -9,6 +9,21 @@ RSpec.describe Gitlab::IssuablesCountForState do let(:counter) { described_class.new(finder) } + describe 'project given' do + let(:project) { build(:project) } + let(:counter) { described_class.new(finder, project) } + + it 'provides the project' do + expect(counter.project).to eq(project) + end + end + + describe '.declarative_policy_class' do + subject { described_class.declarative_policy_class } + + it { is_expected.to eq('IssuablePolicy') } + end + describe '#for_state_or_opened' do it 'returns the number of issuables for the given state' do expect(counter.for_state_or_opened(:closed)).to eq(1) -- cgit v1.2.3