Skip to content

Commit 6be4165

Browse files
authored
Merge pull request #2555 from DFE-Digital/AQTS-729-ineligibility-content-change
AQTS 729 ineligibility content changes
2 parents 12514a8 + d3edfd2 commit 6be4165

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed

app/views/eligibility_interface/result/ineligible.html.erb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<% content_for :page_title, "You’re not eligible" %>
44
<% content_for :back_link_url, ineligible_country ? eligibility_interface_countries_path : eligibility_interface_misconduct_path %>
5+
<% current_date = Date.current %>
56

67
<h1 class="govuk-heading-xl">
78
You’re not eligible to apply for qualified teacher status (QTS) in England
@@ -45,7 +46,11 @@
4546

4647
<% if @eligibility_check.ineligible_reasons.include?(:work_experience) %>
4748
<p class="govuk-body">
48-
If you’re a citizen of Iceland, Norway, or Lichtenstein you can gain more teaching experience during an adaptation period.
49+
<% if current_date <= Date.new(2024, 12, 31) %>
50+
If you’re a citizen of Iceland, Norway, or Liechtenstein you can gain more teaching experience during an adaptation period.
51+
<% else %>
52+
If you’re a citizen of Iceland, Liechtenstein, Norway, or Switzerland you can gain more teaching experience during an adaptation period.
53+
<% end %>
4954
</p>
5055
<% end %>
5156
<% end %>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# frozen_string_literal: true
2+
3+
require "rails_helper"
4+
require "active_support/testing/time_helpers"
5+
6+
RSpec.describe "eligibility_interface/result/ineligible.html.erb",
7+
type: :view do
8+
include ActiveSupport::Testing::TimeHelpers
9+
subject { render }
10+
11+
let(:region) { create(:region) }
12+
let(:eligibility_check) { create(:eligibility_check) }
13+
14+
before { assign(:eligibility_check, eligibility_check) }
15+
16+
it do
17+
expect(subject).to match(
18+
"You’re not eligible to apply for qualified teacher status",
19+
)
20+
end
21+
22+
context "when work experience is under 9 months" do
23+
let(:eligibility_check) do
24+
create(:eligibility_check, region:, work_experience: "under_9_months")
25+
end
26+
27+
it do
28+
expect(subject).to match(
29+
"To apply for QTS, you’ll need at least 9 months of teaching work " \
30+
"experience. This can be gained in any country but must be from after you qualified as a teacher.",
31+
)
32+
end
33+
34+
context "when the date is before 2025" do
35+
it do
36+
travel_to Date.new(2024, 12, 30) do
37+
expect(subject).to match(
38+
"If you’re a citizen of Iceland, Norway, or Liechtenstein you can gain " \
39+
"more teaching experience during an adaptation period.",
40+
)
41+
end
42+
end
43+
end
44+
45+
context "when the date is 2025 or later" do
46+
it do
47+
travel_to Date.new(2025, 1, 1) do
48+
expect(subject).to match(
49+
"If you’re a citizen of Iceland, Liechtenstein, Norway, or Switzerland " \
50+
"you can gain more teaching experience during an adaptation period.",
51+
)
52+
end
53+
end
54+
end
55+
end
56+
end

0 commit comments

Comments
 (0)