Add coverage for `AnnualReport.prepare` method (#33618)

pull/2947/head^2
Matt Jankowski 2025-01-16 10:45:48 -05:00 committed by GitHub
parent a19141441d
commit 3af6739f21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -13,4 +13,13 @@ RSpec.describe AnnualReport do
.to change(GeneratedAnnualReport, :count).by(1) .to change(GeneratedAnnualReport, :count).by(1)
end end
end end
describe '.prepare' do
before { Fabricate :status }
it 'generates records from source class which prepare data' do
expect { described_class.prepare(Time.current.year) }
.to change(AnnualReport::StatusesPerAccountCount, :count).by(1)
end
end
end end