From 65bc0167cb23b5f10ea10d43239c5101e34e1097 Mon Sep 17 00:00:00 2001
From: Phil Lee
Date: Mon, 25 Nov 2024 10:49:09 +0000
Subject: [PATCH] rename independent_reminder path to reminder path
---
app/controllers/reminders_controller.rb | 4 ++--
.../additional_payments/claims/eligible_later.html.erb | 2 +-
.../claims/future_eligibility.html.erb | 2 +-
.../additional_payments/submissions/_reminder.html.erb | 2 +-
.../further_education_payments/submissions/show.html.erb | 2 +-
app/views/reminders/email_verification.html.erb | 8 ++++----
app/views/reminders/personal_details.html.erb | 2 +-
config/routes.rb | 1 -
spec/features/reminders_spec.rb | 2 +-
spec/requests/reminders_spec.rb | 2 +-
10 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/app/controllers/reminders_controller.rb b/app/controllers/reminders_controller.rb
index fa924fd1cb..16386893cc 100644
--- a/app/controllers/reminders_controller.rb
+++ b/app/controllers/reminders_controller.rb
@@ -5,7 +5,7 @@ def show
@form = form_from_slug
if @form.set_reminder_from_claim
- redirect_to independent_reminder_path(journey: journey::ROUTING_NAME, slug: "confirmation")
+ redirect_to reminder_path(journey: journey::ROUTING_NAME, slug: "confirmation")
else
render view_file
end
@@ -15,7 +15,7 @@ def update
@form = form_from_slug
if @form.valid?
- redirect_to independent_reminder_path(
+ redirect_to reminder_path(
journey: journey::ROUTING_NAME,
slug: navigator.next_slug
)
diff --git a/app/views/additional_payments/claims/eligible_later.html.erb b/app/views/additional_payments/claims/eligible_later.html.erb
index e85d0f1542..af320696cf 100644
--- a/app/views/additional_payments/claims/eligible_later.html.erb
+++ b/app/views/additional_payments/claims/eligible_later.html.erb
@@ -61,6 +61,6 @@
Receive a reminder email so you know when to apply. We cannot issue payments unless you apply.
- <%= link_to "Set reminder", independent_reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details"), class: "govuk-button", role: :button, data: { module: "govuk-button"} %>
+ <%= link_to "Set reminder", reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details"), class: "govuk-button", role: :button, data: { module: "govuk-button"} %>
diff --git a/app/views/additional_payments/claims/future_eligibility.html.erb b/app/views/additional_payments/claims/future_eligibility.html.erb
index da07573556..23c5f6c1b7 100644
--- a/app/views/additional_payments/claims/future_eligibility.html.erb
+++ b/app/views/additional_payments/claims/future_eligibility.html.erb
@@ -18,6 +18,6 @@
Receive a reminder email so you know when to check your eligibility and apply. We cannot issue payments unless you apply.
- <%= link_to "Set reminder", independent_reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details"), class: "govuk-button", role: :button, data: { module: "govuk-button"} %>
+ <%= link_to "Set reminder", reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details"), class: "govuk-button", role: :button, data: { module: "govuk-button"} %>
diff --git a/app/views/additional_payments/submissions/_reminder.html.erb b/app/views/additional_payments/submissions/_reminder.html.erb
index 3b205df9e2..5150f16ff4 100644
--- a/app/views/additional_payments/submissions/_reminder.html.erb
+++ b/app/views/additional_payments/submissions/_reminder.html.erb
@@ -10,4 +10,4 @@
Receive a reminder email so you know when you can apply next year. We cannot issue payments unless you apply.
-<%= govuk_button_link_to "Set reminder", independent_reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details") %>
+<%= govuk_button_link_to "Set reminder", reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details") %>
diff --git a/app/views/further_education_payments/submissions/show.html.erb b/app/views/further_education_payments/submissions/show.html.erb
index 13391febc4..cdf3f37850 100644
--- a/app/views/further_education_payments/submissions/show.html.erb
+++ b/app/views/further_education_payments/submissions/show.html.erb
@@ -39,6 +39,6 @@
You can set a reminder so you know when you are able to apply. We cannot issue payments unless you apply.
- <%= govuk_button_link_to "Set reminder", independent_reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details") %>
+ <%= govuk_button_link_to "Set reminder", reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details") %>
diff --git a/app/views/reminders/email_verification.html.erb b/app/views/reminders/email_verification.html.erb
index 4a95496a1e..bdc6cce4f7 100644
--- a/app/views/reminders/email_verification.html.erb
+++ b/app/views/reminders/email_verification.html.erb
@@ -1,11 +1,11 @@
<% content_for(:page_title, page_title(t("one_time_password.title"), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>
-<% @backlink_path = independent_reminder_path(current_journey_routing_name, navigator.previous_slug) %>
+<% @backlink_path = reminder_path(current_journey_routing_name, navigator.previous_slug) %>
<%= form_with model: @form,
- url: independent_reminder_path(current_journey_routing_name),
+ url: reminder_path(current_journey_routing_name),
builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %>
<%= f.govuk_error_summary %>
@@ -32,12 +32,12 @@
<% end %>
- <%= govuk_link_to "Resend passcode (you will be sent back to the email address page)", independent_reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details"), no_visited_state: true %>
+ <%= govuk_link_to "Resend passcode (you will be sent back to the email address page)", reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details"), no_visited_state: true %>
<%= f.govuk_submit "Confirm" %>
- <%= govuk_button_link_to "Change email address", independent_reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details"), secondary: true %>
+ <%= govuk_button_link_to "Change email address", reminder_path(journey: journey::ROUTING_NAME, slug: "personal-details"), secondary: true %>
<% end %>
diff --git a/app/views/reminders/personal_details.html.erb b/app/views/reminders/personal_details.html.erb
index b6070cb129..fcd8443a72 100644
--- a/app/views/reminders/personal_details.html.erb
+++ b/app/views/reminders/personal_details.html.erb
@@ -3,7 +3,7 @@
<%= form_with model: @form,
- url: independent_reminder_path(current_journey_routing_name),
+ url: reminder_path(current_journey_routing_name),
builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %>
<%= f.govuk_error_summary %>
diff --git a/config/routes.rb b/config/routes.rb
index 4c0494edef..3d62b88694 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -70,7 +70,6 @@ def matches?(request)
only: [:show, :update],
param: :slug,
controller: "reminders",
- as: :independent_reminders,
constraints: {
slug: %r{#{Journeys::Reminders::SlugSequence::SLUGS.join("|")}}
}
diff --git a/spec/features/reminders_spec.rb b/spec/features/reminders_spec.rb
index c7b42ff999..2a655913cb 100644
--- a/spec/features/reminders_spec.rb
+++ b/spec/features/reminders_spec.rb
@@ -147,7 +147,7 @@
fill_in "Email address", with: "david.tau1988@hotmail.co.uk"
click_on "Continue"
- expect(page).to have_link("Resend passcode (you will be sent back to the email address page)", href: independent_reminder_path(journey: journey_session.journey, slug: "personal-details"))
+ expect(page).to have_link("Resend passcode (you will be sent back to the email address page)", href: reminder_path(journey: journey_session.journey, slug: "personal-details"))
click_link "Resend passcode"
expect(page).to have_text("Personal details")
diff --git a/spec/requests/reminders_spec.rb b/spec/requests/reminders_spec.rb
index 1f8a5794fc..6a2277b9ba 100644
--- a/spec/requests/reminders_spec.rb
+++ b/spec/requests/reminders_spec.rb
@@ -7,7 +7,7 @@
end
describe "#create" do
- let(:submit_form) { put independent_reminder_path(journey: "additional-payments", slug: "personal-details", params: form_params) }
+ let(:submit_form) { put reminder_path(journey: "additional-payments", slug: "personal-details", params: form_params) }
context "with full name and valid email address" do
let(:form_params) { {claim: {reminder_full_name: "Joe Bloggs", reminder_email_address: "joe.bloggs@example.com"}} }