From 3ab34f4232c7a28bc6ebe77fcfa2cfd416b67efb Mon Sep 17 00:00:00 2001 From: Avin Hurry Date: Wed, 17 Jul 2024 18:37:30 +0100 Subject: [PATCH] [2061] Fix tests which will fail when the current cycle ends --- spec/components/add_course_button_preview.rb | 2 +- spec/features/publish/courses/editing_study_sites_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/components/add_course_button_preview.rb b/spec/components/add_course_button_preview.rb index a35255eddd..4c846198c7 100644 --- a/spec/components/add_course_button_preview.rb +++ b/spec/components/add_course_button_preview.rb @@ -42,7 +42,7 @@ def provider_code end def recruitment_cycle_year - 2024 + Settings.current_recruitment_cycle_year end def accredited_provider? diff --git a/spec/features/publish/courses/editing_study_sites_spec.rb b/spec/features/publish/courses/editing_study_sites_spec.rb index 88a5242a00..5bbbce3bbc 100644 --- a/spec/features/publish/courses/editing_study_sites_spec.rb +++ b/spec/features/publish/courses/editing_study_sites_spec.rb @@ -64,7 +64,7 @@ def when_i_visit_the_course_details_page end def when_i_am_authenticated_as_a_provider_user_with_study_sites - providers = [build(:provider, sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site)], courses: [build(:course, :with_accrediting_provider, applications_open_from: '2023-10-10', start_date: '2023-10-10')])] + providers = [build(:provider, sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site)], courses: [build(:course, :with_accrediting_provider)])] @user = create(:user, providers:) given_i_am_authenticated(user: @user) end