-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken 'Finished' link on renewal end pages (#647)
https://eaflood.atlassian.net/browse/RUBY-859 We spotted that the 'Finished' button on the 'Renewal complete' and 'Renewal received' buttons was not behaving properly. For front office users, we now want to redirect straight to the front office dashboard; for back office users, we want to redirect to the new 'view details' page in the back office. So we'll just provide a new default method in the engine and let the host apps override it as needed.
- Loading branch information
1 parent
a7ba0e7
commit 22da686
Showing
9 changed files
with
29 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
module WasteCarriersEngine | ||
module JourneyLinksHelper | ||
def renewal_finished_link(*) | ||
# Designed to be overridden in host apps if needed | ||
main_app.root_path | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
spec/helpers/waste_carriers_engine/journey_links_helper_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
module WasteCarriersEngine | ||
RSpec.describe WasteCarriersEngine::JourneyLinksHelper, type: :helper do | ||
describe "renewal_finished_link" do | ||
it "returns the correct value" do | ||
expect(helper.renewal_finished_link).to eq("/") | ||
end | ||
end | ||
end | ||
end |