Skip to content

Commit

Permalink
Improve qualification factory
Browse files Browse the repository at this point in the history
This makes the dates more dynamic and therefore more varied.
  • Loading branch information
thomasleese committed Jan 11, 2024
1 parent 55952a2 commit da90e93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/factories/qualifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
title { Faker::Educator.degree }
institution_name { Faker::University.name }
sequence :institution_country_code, Country::CODES.cycle
start_date { Date.new(2020, 1, 1) }
complete_date { Date.new(2021, 1, 1) }
certificate_date { Date.new(2021, 1, 1) }
start_date { Faker::Date.between(from: 30.years.ago, to: 10.years.ago) }
complete_date { start_date + 5.years }
certificate_date { complete_date + 1.year }
part_of_university_degree { true }

after(:create) do |qualification, _evaluator|
Expand Down

0 comments on commit da90e93

Please sign in to comment.