Skip to content

Commit

Permalink
DROP THIS
Browse files Browse the repository at this point in the history
  • Loading branch information
rjlynch committed Oct 22, 2024
1 parent 620cacc commit 16c5604
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/claim/claims_preventing_payment_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def initialize(claim)
# provided by `claim`, and hence `claim` cannot be paid in the same payment
# as the returned claims.
def claims_preventing_payment
@claims_preventing_payment ||= find_claims_preventing_payment
[]
end

private
Expand Down
21 changes: 20 additions & 1 deletion db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require "faker"
require Rails.application.root.join("lib", "factory_helpers")
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
Expand Down Expand Up @@ -27,7 +29,24 @@
AcademicYear.current
).run

SchoolDataImporterJob.perform_later if School.count < 100
SchoolDataImporterJob.perform_now if School.count < 100

PayrollRun.destroy_all

FactoryHelpers.create_factory_registry
FactoryHelpers.reset_factory_registry

FactoryBot.create(
:payroll_run,
claims_counts: {
Policies::StudentLoans => 600,
Policies::EarlyCareerPayments => 900,
[Policies::EarlyCareerPayments, Policies::StudentLoans] => 300,
Policies::FurtherEducationPayments => 600,
Policies::InternationalRelocationPayments => 300,
Policies::LevellingUpPremiumPayments => 301
}
)
end

if Rails.env.development?
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/schools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
journey { nil }
end

sequence(:urn)
sequence(:urn) { |n| School.maximum(:urn).to_i + n }
name { "#{Faker::Company.unique.name} School" }
school_type { :community_school }
school_type_group { :la_maintained }
Expand Down

0 comments on commit 16c5604

Please sign in to comment.