Browse Source

Initialise 2021/22 form routes for tests

further-bulk-upload-year-fixes
Kat 2 years ago
parent
commit
075e68e3aa
  1. 13
      config/routes.rb

13
config/routes.rb

@ -161,6 +161,19 @@ Rails.application.routes.draw do
get "#{subsection.id.to_s.dasherize}/check-answers", to: "form#check_answers"
end
end
if Rails.env.test?
[Form.new("spec/fixtures/forms/2021_2022.json"),
Form.new("config/forms/2021_2022.json")].each do |form|
form.pages.map do |page|
get page.id.to_s.dasherize, to: "form#show_page"
end
form.subsections.map do |subsection|
get "#{subsection.id.to_s.dasherize}/check-answers", to: "form#check_answers"
end
end
end
end
resources :sales_logs, path: "/sales-logs" do

Loading…
Cancel
Save