Skip to content

Commit

Permalink
Remove CBL data from CTR
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpattinson committed Sep 11, 2024
1 parent 56b7af2 commit fa5eec3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 51 deletions.
11 changes: 0 additions & 11 deletions app/components/check_records/teacher_profile_summary_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def initialize(teacher)
end

def build_tags
append_restriction_tag
append_teaching_status_tag
append_induction_tag
end
Expand All @@ -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'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fa5eec3

Please sign in to comment.