diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /spec/workers/project_daily_statistics_worker_spec.rb | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'spec/workers/project_daily_statistics_worker_spec.rb')
-rw-r--r-- | spec/workers/project_daily_statistics_worker_spec.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/spec/workers/project_daily_statistics_worker_spec.rb b/spec/workers/project_daily_statistics_worker_spec.rb deleted file mode 100644 index fa9d938acca..00000000000 --- a/spec/workers/project_daily_statistics_worker_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -RSpec.describe ProjectDailyStatisticsWorker, '#perform' do - let(:worker) { described_class.new } - let(:project) { create(:project) } - - describe '#perform' do - context 'with a non-existing project' do - it 'does nothing' do - expect(Projects::FetchStatisticsIncrementService).not_to receive(:new) - - worker.perform(-1) - end - end - - context 'with an existing project without a repository' do - it 'does nothing' do - expect(Projects::FetchStatisticsIncrementService).not_to receive(:new) - - worker.perform(project.id) - end - end - - it 'calls daily_statistics_service with the given project' do - project = create(:project, :repository) - - expect_next_instance_of(Projects::FetchStatisticsIncrementService, project) do |service| - expect(service).to receive(:execute) - end - - worker.perform(project.id) - end - end -end |