diff --git a/spec/factories/application_forms.rb b/spec/factories/application_forms.rb index bb1343dd42..27019a5f30 100644 --- a/spec/factories/application_forms.rb +++ b/spec/factories/application_forms.rb @@ -180,6 +180,7 @@ trait :submitted do not_started_stage status { "submitted" } + statuses { %w[assessment_not_started] } submitted_at { Time.zone.now } working_days_since_submission { 0 } @@ -200,12 +201,14 @@ pre_assessment_stage requires_preliminary_check { true } status { "preliminary_check" } + statuses { %w[preliminary_check] } end trait :assessment_in_progress do submitted assessment_stage status { "assessment_in_progress" } + statuses { %w[assessment_in_progress] } end trait :waiting_on do @@ -213,36 +216,63 @@ action_required_by_external verification_stage status { "waiting_on" } + statuses do + %w[ + waiting_on_further_information + waiting_on_lops + waiting_on_qualification + waiting_on_reference + ] + end end trait :received do submitted verification_stage status { "received" } + statuses do + %w[ + received_further_information + received_lops + received_qualification + received_reference + ] + end end trait :overdue do submitted verification_stage status { "overdue" } + statuses do + %w[ + overdue_further_information + overdue_lops + overdue_qualification + overdue_reference + ] + end end trait :awarded_pending_checks do submitted review_stage status { "awarded_pending_checks" } + statuses { %w[awarded_pending_checks] } end trait :potential_duplicate_in_dqt do submitted review_stage status { "potential_duplicate_in_dqt" } + statuses { %w[potential_duplicate_in_dqt] } end trait :awarded do submitted completed_stage status { "awarded" } + statuses { %w[awarded] } awarded_at { Time.zone.now } end @@ -250,6 +280,7 @@ submitted completed_stage status { "declined" } + statuses { %w[declined] } declined_at { Time.zone.now } end @@ -257,6 +288,7 @@ submitted completed_stage status { "withdrawn" } + statuses { %w[withdrawn] } withdrawn_at { Time.zone.now } end