debian-mirror-gitlab/spec/services/milestones/merge_requests_count_service_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
661 B
Ruby
Raw Normal View History

2021-04-29 21:17:54 +05:30
# frozen_string_literal: true
require 'spec_helper'
2023-05-27 22:25:52 +05:30
RSpec.describe Milestones::MergeRequestsCountService, :use_clean_rails_memory_store_caching,
feature_category: :team_planning do
2021-04-29 21:17:54 +05:30
let_it_be(:project) { create(:project, :empty_repo) }
let_it_be(:milestone) { create(:milestone, project: project) }
before_all do
create(:merge_request, milestone: milestone, source_project: project)
create(:merge_request, :closed, milestone: milestone, source_project: project)
end
subject { described_class.new(milestone) }
it_behaves_like 'a counter caching service'
it 'counts all merge requests' do
expect(subject.count).to eq(2)
end
end