software_update_check_scheduler_spec.rb 496 B

1234567891011121314151617181920
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe Scheduler::SoftwareUpdateCheckScheduler do
  4. subject { described_class.new }
  5. describe 'perform' do
  6. let(:service_double) { instance_double(SoftwareUpdateCheckService, call: nil) }
  7. before do
  8. allow(SoftwareUpdateCheckService).to receive(:new).and_return(service_double)
  9. end
  10. it 'calls SoftwareUpdateCheckService' do
  11. subject.perform
  12. expect(service_double).to have_received(:call)
  13. end
  14. end
  15. end