debian-mirror-gitlab/spec/workers/update_project_statistics_worker_spec.rb

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

20 lines
511 B
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
2019-07-31 22:56:46 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe UpdateProjectStatisticsWorker do
2019-07-31 22:56:46 +05:30
let(:worker) { described_class.new }
let(:project) { create(:project, :repository) }
let(:statistics) { %w(repository_size) }
describe '#perform' do
it 'updates the project statistics' do
expect(Projects::UpdateStatisticsService).to receive(:new)
.with(project, nil, statistics: statistics)
.and_call_original
worker.perform(project.id, statistics)
end
end
end