From 037cb73608fba77c41e3526f31156f65fff7b103 Mon Sep 17 00:00:00 2001 From: Avin Hurry Date: Wed, 11 Sep 2024 13:48:02 +0100 Subject: [PATCH] [2280] Rename course_type_determiner To degree_type_determiner --- app/controllers/find/search/visa_status_controller.rb | 2 +- app/services/course_search_service.rb | 2 +- ...pe_answer_determiner.rb => degree_type_answer_determiner.rb} | 2 +- app/view_objects/find/result_filters/filters_view.rb | 2 +- ...determiner_spec.rb => degree_type_answer_determiner_spec.rb} | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename app/services/find/{course_type_answer_determiner.rb => degree_type_answer_determiner.rb} (97%) rename spec/services/find/{course_type_answer_determiner_spec.rb => degree_type_answer_determiner_spec.rb} (98%) diff --git a/app/controllers/find/search/visa_status_controller.rb b/app/controllers/find/search/visa_status_controller.rb index 9f24408ae8..5f6f53c90d 100644 --- a/app/controllers/find/search/visa_status_controller.rb +++ b/app/controllers/find/search/visa_status_controller.rb @@ -41,7 +41,7 @@ def next_step_path end def degree_type_answer_determiner - @degree_type_answer_determiner ||= CourseTypeAnswerDeterminer.new( + @degree_type_answer_determiner ||= DegreeTypeAnswerDeterminer.new( university_degree_status: form_params[:university_degree_status], age_group: form_params[:age_group], visa_status: form_params[:visa_status] diff --git a/app/services/course_search_service.rb b/app/services/course_search_service.rb index f90025cd35..1816eaa66a 100644 --- a/app/services/course_search_service.rb +++ b/app/services/course_search_service.rb @@ -7,7 +7,7 @@ def initialize( filter:, sort: nil, course_scope: Course, - degree_type_answer_determiner: Find::CourseTypeAnswerDeterminer + degree_type_answer_determiner: Find::DegreeTypeAnswerDeterminer ) @filter = filter || {} @course_scope = course_scope diff --git a/app/services/find/course_type_answer_determiner.rb b/app/services/find/degree_type_answer_determiner.rb similarity index 97% rename from app/services/find/course_type_answer_determiner.rb rename to app/services/find/degree_type_answer_determiner.rb index d22379c2c3..def201ce5c 100644 --- a/app/services/find/course_type_answer_determiner.rb +++ b/app/services/find/degree_type_answer_determiner.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Find - class CourseTypeAnswerDeterminer + class DegreeTypeAnswerDeterminer attr_reader :age_group, :visa_status, :university_degree_status def initialize(age_group:, visa_status:, university_degree_status:) diff --git a/app/view_objects/find/result_filters/filters_view.rb b/app/view_objects/find/result_filters/filters_view.rb index 057fe89ed4..182bd020f7 100644 --- a/app/view_objects/find/result_filters/filters_view.rb +++ b/app/view_objects/find/result_filters/filters_view.rb @@ -40,7 +40,7 @@ def qualification_params_nil? end def show_undergraduate_courses? - CourseTypeAnswerDeterminer.new( + DegreeTypeAnswerDeterminer.new( age_group: params[:age_group], university_degree_status: params[:university_degree_status], visa_status: params[:visa_status] diff --git a/spec/services/find/course_type_answer_determiner_spec.rb b/spec/services/find/degree_type_answer_determiner_spec.rb similarity index 98% rename from spec/services/find/course_type_answer_determiner_spec.rb rename to spec/services/find/degree_type_answer_determiner_spec.rb index b4a71aef39..b41d96e624 100644 --- a/spec/services/find/course_type_answer_determiner_spec.rb +++ b/spec/services/find/degree_type_answer_determiner_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe Find::CourseTypeAnswerDeterminer do +RSpec.describe Find::DegreeTypeAnswerDeterminer do describe '#show_undergraduate_courses?' do context 'when the age group is not further education, no degree, and no visa sponsorship required' do let(:params) do