From b6460a20155908eb11c03579bc2cd67150fcdc1c Mon Sep 17 00:00:00 2001 From: Steve Hook Date: Fri, 13 Oct 2023 13:02:10 +0100 Subject: [PATCH] Fix Rubocop issues --- app/models/application_choice.rb | 8 -------- spec/mailers/candidate_mailer_spec.rb | 2 +- spec/mailers/previews/candidate_mailer_preview.rb | 6 +++--- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/app/models/application_choice.rb b/app/models/application_choice.rb index c9cfb222d96..93de4207884 100644 --- a/app/models/application_choice.rb +++ b/app/models/application_choice.rb @@ -265,14 +265,6 @@ def supplementary_statuses end end - def supplementary_statuses - [].tap do |supplementary_statuses| - if recruited? && RecruitedWithPendingConditions.new(application_choice: self).call - supplementary_statuses << :ske_pending_conditions - end - end - end - private def set_initial_status diff --git a/spec/mailers/candidate_mailer_spec.rb b/spec/mailers/candidate_mailer_spec.rb index 8b0ef1430ef..d6801db648a 100644 --- a/spec/mailers/candidate_mailer_spec.rb +++ b/spec/mailers/candidate_mailer_spec.rb @@ -436,7 +436,7 @@ end before do - FeatureFlag.activate(:recruit_with_pending_conditions) + FeatureFlag.activate(:recruit_with_pending_conditions) application_choices.first.provider.provider_type = :scitt application_choices.first.course.start_date = 2.months.from_now end diff --git a/spec/mailers/previews/candidate_mailer_preview.rb b/spec/mailers/previews/candidate_mailer_preview.rb index d1b6a28cbb3..58003fc5e09 100644 --- a/spec/mailers/previews/candidate_mailer_preview.rb +++ b/spec/mailers/previews/candidate_mailer_preview.rb @@ -813,12 +813,12 @@ def conditions_met def conditions_met_with_pending_ske_conditions FeatureFlag.activate(:recruit_with_pending_conditions) - application_choice = application_choice_with_offer.tap do |choice| + application_choice = application_choice_pending_conditions.tap do |choice| choice.offer.conditions.first.status = :met choice.offer.ske_conditions = [FactoryBot.build_stubbed(:ske_condition, status: :pending)] choice.status = :recruited - choice.provider.provider_type = :scitt - choice.course.start_date = 1.month.from_now + choice.current_course_option.provider.provider_type = :scitt + choice.current_course_option.course.start_date = 1.month.from_now end CandidateMailer.conditions_met(application_choice)