2024-09-03 19:05:26 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
2024-09-04 15:12:25 +10:00
|
|
|
RSpec.describe AnnualReport do
|
2024-09-03 19:05:26 +10:00
|
|
|
describe '#generate' do
|
|
|
|
subject { described_class.new(account, Time.zone.now.year) }
|
|
|
|
|
|
|
|
let(:account) { Fabricate :account }
|
|
|
|
|
|
|
|
it 'builds a report for an account' do
|
|
|
|
expect { subject.generate }
|
|
|
|
.to change(GeneratedAnnualReport, :count).by(1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|