2019-03-30 07:15:48 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-06-10 15:27:49 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 15:08:50 +00:00
|
|
|
RSpec.describe ExpireBuildArtifactsWorker do
|
2016-06-10 19:45:06 +00:00
|
|
|
let(:worker) { described_class.new }
|
2016-06-10 15:27:49 +00:00
|
|
|
|
|
|
|
describe '#perform' do
|
2019-01-17 06:06:37 +00:00
|
|
|
it 'executes a service' do
|
2020-01-17 21:08:29 +00:00
|
|
|
expect_next_instance_of(Ci::DestroyExpiredJobArtifactsService) do |instance|
|
|
|
|
expect(instance).to receive(:execute)
|
|
|
|
end
|
2019-01-17 06:06:37 +00:00
|
|
|
|
|
|
|
worker.perform
|
|
|
|
end
|
|
|
|
end
|
2016-06-10 15:27:49 +00:00
|
|
|
end
|