require 'rails_helper'

RSpec.describe StatsReportGenerationJob, type: :job do
  describe '#perform' do
    let(:report_type) { 'provisional_assessment' }
    let(:result) { double(:generator_result) }

    subject(:job) { described_class.new }

    it 'calls the stats report generator with the provided report type' do
      expect(Stats::StatsReportGenerator).to receive(:call).with(report_type).and_return(result)
      expect(job.perform(report_type)).to eq(result)
    end
  end
end

require 'rails_helper'

RSpec.describe StatsReportGenerationJob, type: :job do
  subject(:job) { described_class.new }

  describe '#perform' do
    subject (:perform) { job.perform(report_type) }

    let(:report_type) { 'provisional_assessment' }

    it 'calls the stats report generator with the provided report type' do
      expect(Stats::StatsReportGenerator).to receive(:call).with(report_type)
      perform
    end
  end
end

Remove spec of returned result from job
Remove spec of returned result from job

The jobs returned result is not important
and prevents adding logging for job completion.
