2019-07-07 11:18:12 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe ExpireBuildArtifactsWorker do
|
2016-06-16 23:09:34 +05:30
|
|
|
let(:worker) { described_class.new }
|
|
|
|
|
|
|
|
describe '#perform' do
|
2019-03-02 22:35:43 +05:30
|
|
|
it 'executes a service' do
|
2020-03-13 15:44:24 +05:30
|
|
|
expect_next_instance_of(Ci::DestroyExpiredJobArtifactsService) do |instance|
|
|
|
|
expect(instance).to receive(:execute)
|
|
|
|
end
|
2019-03-02 22:35:43 +05:30
|
|
|
|
|
|
|
worker.perform
|
|
|
|
end
|
|
|
|
end
|
2016-06-16 23:09:34 +05:30
|
|
|
end
|