2023-09-01 17:47:07 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
2024-09-04 07:12:25 +02:00
|
|
|
RSpec.describe Scheduler::SoftwareUpdateCheckScheduler do
|
2023-09-01 17:47:07 +02:00
|
|
|
subject { described_class.new }
|
|
|
|
|
|
|
|
describe 'perform' do
|
|
|
|
let(:service_double) { instance_double(SoftwareUpdateCheckService, call: nil) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
allow(SoftwareUpdateCheckService).to receive(:new).and_return(service_double)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'calls SoftwareUpdateCheckService' do
|
|
|
|
subject.perform
|
|
|
|
expect(service_double).to have_received(:call)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|