Skip to content

Commit

Permalink
Merge pull request #6896 from alphagov/remove-marriage-abroad-hacks
Browse files Browse the repository at this point in the history
Remove marriage abroad hacks
  • Loading branch information
ellohez authored Oct 4, 2024
2 parents 5b0d76f + 9f5e127 commit ada44b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
4 changes: 1 addition & 3 deletions app/presenters/flow_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ def change_answer_link(question, forwarding_responses)
end

def start_page_link(forwarding_responses)
if @flow.name.eql? "marriage-abroad" # Nasty hack to allow migration of old service to new one. Will be stripped asap
"https://www.prove-eligibility-foreign-government.service.gov.uk/before-you-start"
elsif response_store
if response_store
start_flow_path(name, params: forwarding_responses)
else
smart_answer_path(name)
Expand Down
7 changes: 2 additions & 5 deletions app/views/smart_answers/landing.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
<meta name="description" content="<%= start_node.meta_description %>">
<% end %>
<% if content_item.present? %>
<% canonical_url = "https://www.gov.uk/marriages-civil-partnerships-abroad" if start_node.node_slug == "marriage-abroad" %>
<%= render "govuk_publishing_components/components/machine_readable_metadata",
schema: :article,
content_item: content_item,
canonical_url: %>
content_item: content_item %>
<%= render "govuk_publishing_components/components/machine_readable_metadata",
schema: :government_service,
content_item: content_item,
canonical_url: %>
content_item: content_item %>
<% end %>
<link title="Search" rel="search" type="application/opensearchdescription+xml" href="/search/opensearch.xml">
<% end %>
Expand Down
11 changes: 0 additions & 11 deletions test/unit/flow_presenter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,4 @@ def flow_registry
test "#start_page_link returns the start page link for a non response store flow" do
assert_equal "/flow-name/y", @flow_presenter.start_page_link({ "key" => "value" })
end

test "#start_page_link returns the new flow when we're in marriage-abroad" do
@flow = SmartAnswer::Flow.build do
name "marriage-abroad"
end
@flow_presenter = FlowPresenter.new(@flow, nil)
assert_equal(
"https://www.prove-eligibility-foreign-government.service.gov.uk/before-you-start",
@flow_presenter.start_page_link({ "key" => "value" }),
)
end
end

0 comments on commit ada44b8

Please sign in to comment.