debian-mirror-gitlab/spec/services/projects/open_issues_count_service_spec.rb
2018-03-17 18:26:18 +05:30

21 lines
581 B
Ruby

require 'spec_helper'
describe Projects::OpenIssuesCountService do
describe '#count' do
it 'returns the number of open issues' do
project = create(:project)
create(:issue, :opened, project: project)
expect(described_class.new(project).count).to eq(1)
end
it 'does not include confidential issues in the issue count' do
project = create(:project)
create(:issue, :opened, project: project)
create(:issue, :opened, confidential: true, project: project)
expect(described_class.new(project).count).to eq(1)
end
end
end