Skip to content

Commit

Permalink
rename independent_reminder path to reminder path
Browse files Browse the repository at this point in the history
  • Loading branch information
asmega committed Nov 25, 2024
1 parent 028a5b5 commit 65bc016
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/controllers/reminders_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@
Receive a reminder email so you know when to apply. We cannot issue payments unless you apply.
</p>

<%= 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"} %>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</p>

<%= 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"} %>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
Receive a reminder email so you know when you can apply next year. We cannot issue payments unless you apply.
</p>

<%= 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") %>
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</p>

<%= 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") %>
</div>
</div>
8 changes: 4 additions & 4 deletions app/views/reminders/email_verification.html.erb
Original file line number Diff line number Diff line change
@@ -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) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= 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 %>

Expand All @@ -32,12 +32,12 @@
<% end %>

<div class="govuk-body govuk-!-margin-bottom-6">
<%= 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 %>
</div>

<div class="govuk-button-group">
<%= 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 %>
</div>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/reminders/personal_details.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= 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 %>

Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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("|")}}
}
Expand Down
2 changes: 1 addition & 1 deletion spec/features/reminders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
fill_in "Email address", with: "[email protected]"
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")
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/reminders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: "[email protected]"}} }
Expand Down

0 comments on commit 65bc016

Please sign in to comment.