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

forks_count_service_spec.rb « projects « services « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 31662f789736846e8377c46af79e568a47cdf90b (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 Projects::ForksCountService, :use_clean_rails_memory_store_caching do
  let(:project) { build(:project) }

  subject { described_class.new(project) }

  it_behaves_like 'a counter caching service'

  describe '#count' do
    it 'returns the number of forks' do
      allow(subject).to receive(:uncached_count).and_return(1)

      expect(subject.count).to eq(1)
    end
  end
end