From 4476c7e5723f321c4a737f2807183dbe6c27e147 Mon Sep 17 00:00:00 2001 From: Avin Hurry Date: Thu, 21 Mar 2024 09:29:35 +0000 Subject: [PATCH] The preview is not rendering because subjects is undefined --- .../fees_and_financial_support_component/view_preview.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/components/find/courses/financial_support/fees_and_financial_support_component/view_preview.rb b/spec/components/find/courses/financial_support/fees_and_financial_support_component/view_preview.rb index 83846ae7c1..a7b7d35530 100644 --- a/spec/components/find/courses/financial_support/fees_and_financial_support_component/view_preview.rb +++ b/spec/components/find/courses/financial_support/fees_and_financial_support_component/view_preview.rb @@ -97,7 +97,8 @@ def scholarship_and_bursary_course bursary_amount: 99_999_999, scholarship_amount: 1, has_early_career_payments: true, - subject_name: 'foobar') + subject_name: 'foobar', + subjects: []) end def financial_support_course @@ -119,7 +120,7 @@ def financial_support_course class FakeCourse include ActiveModel::Model - attr_accessor(:has_fees, :salaried, :excluded_from_bursary, :bursary_only, :has_scholarship_and_bursary, :financial_support, :fee_uk_eu, :fee_international, :cycle_range, :fee_details, :bursary_amount, :scholarship_amount, :has_early_career_payments, :subject_name) + attr_accessor(:has_fees, :salaried, :excluded_from_bursary, :bursary_only, :has_scholarship_and_bursary, :financial_support, :fee_uk_eu, :fee_international, :cycle_range, :fee_details, :bursary_amount, :scholarship_amount, :has_early_career_payments, :subject_name, :subjects) def enrichment_attribute(params) send(params)