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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-12 06:10:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-12 06:10:17 +0300
commit737684a392db1178770ad5b1d20b64386aadcac5 (patch)
treea5b304cf7cd4d0c41ad3bde432d20edd7d79257d /spec/lib/gitlab/issuables_count_for_state_spec.rb
parent80ddaef34dd357706187bd888b34e7ca1d5c30ba (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/issuables_count_for_state_spec.rb')
-rw-r--r--spec/lib/gitlab/issuables_count_for_state_spec.rb15
1 files changed, 15 insertions, 0 deletions
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)