From fa5eec338d8da1678a41943de42339a101dde57e Mon Sep 17 00:00:00 2001 From: Richard Pattinson Date: Mon, 9 Sep 2024 09:46:09 +0100 Subject: [PATCH] Remove CBL data from CTR --- .../teacher_profile_summary_component.rb | 11 ----- .../teacher_profile_summary_component_spec.rb | 40 ------------------- 2 files changed, 51 deletions(-) diff --git a/app/components/check_records/teacher_profile_summary_component.rb b/app/components/check_records/teacher_profile_summary_component.rb index 4eb1fa84..f4d4fe38 100644 --- a/app/components/check_records/teacher_profile_summary_component.rb +++ b/app/components/check_records/teacher_profile_summary_component.rb @@ -12,7 +12,6 @@ def initialize(teacher) end def build_tags - append_restriction_tag append_teaching_status_tag append_induction_tag end @@ -21,16 +20,6 @@ def build_tags delegate :no_restrictions?, :possible_restrictions?, to: :teacher - def append_restriction_tag - tags << if no_restrictions? - { message: 'No restrictions', colour: 'green'} - elsif possible_restrictions? - { message: 'Possible restrictions', colour: 'blue'} - else - { message: 'Restriction', colour: 'red'} - end - end - def append_teaching_status_tag tags << if teacher.qts_awarded? { message: 'QTS', colour: 'green'} diff --git a/spec/components/check_records/teacher_profile_summary_component_spec.rb b/spec/components/check_records/teacher_profile_summary_component_spec.rb index eca7d8dc..c4ee5561 100644 --- a/spec/components/check_records/teacher_profile_summary_component_spec.rb +++ b/spec/components/check_records/teacher_profile_summary_component_spec.rb @@ -134,45 +134,5 @@ end end end - - describe 'restrictions statuses' do - describe "No restrictions tag" do - context "teacher#no_restrictions is true" do - before { allow(teacher).to receive(:no_restrictions?).and_return(true) } - - it "adds the No restrictions tag" do - render_inline described_class.new(teacher) - - expect(page).to have_text("No restrictions") - end - end - - context "teacher#no_restrictions returns false " do - before do - allow(teacher).to receive(:no_restrictions?).and_return(false) - allow(teacher).to receive(:possible_restrictions?).and_return(true) - end - - it "adds the possible restriction tag" do - render_inline described_class.new(teacher) - - expect(page).to have_text("Possible restriction") - end - end - - context "teacher has a restriction" do - before do - allow(teacher).to receive(:no_restrictions?).and_return(false) - allow(teacher).to receive(:possible_restrictions?).and_return(false) - end - - it "adds the restriction tag" do - render_inline described_class.new(teacher) - - expect(page).to have_text("Restriction") - end - end - end - end end end