From 048616b4c1977f239ea2420edb6575de6c4971c6 Mon Sep 17 00:00:00 2001 From: Alexander Griffen Date: Fri, 22 Mar 2024 09:45:43 +0000 Subject: [PATCH] Change some of the 'alaveteli pro' routes to 'pro' routes --- config/routes.rb | 6 +++--- .../batch_request_authority_searches_controller_spec.rb | 2 +- spec/views/alaveteli_pro/info_requests/new.html.erb_spec.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 72d227db92..87ab3dbc7a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -872,8 +872,8 @@ def matches?(request) end end - namespace :alaveteli_pro do - root to: 'dashboard#index', :as => :dashboard, :via => :get + namespace :alaveteli_pro, path: 'pro' do + get :dashboard, to: 'dashboard#index' resources :draft_info_requests, :only => [:create, :update] resources :info_requests, only: [:new, :create, :index] do get :preview, on: :new # /info_request/new/preview @@ -906,7 +906,7 @@ def matches?(request) resources :public_bodies, :only => [:index] end - scope path: :alaveteli_pro do + scope path: :pro do # So that we can show a batch request using the existing controller from # the pro context match '/info_request_batches/:id' => 'info_request_batch#show', diff --git a/spec/controllers/alaveteli_pro/batch_request_authority_searches_controller_spec.rb b/spec/controllers/alaveteli_pro/batch_request_authority_searches_controller_spec.rb index 87c53d47db..d6bb8d1a90 100644 --- a/spec/controllers/alaveteli_pro/batch_request_authority_searches_controller_spec.rb +++ b/spec/controllers/alaveteli_pro/batch_request_authority_searches_controller_spec.rb @@ -139,7 +139,7 @@ it 'redirects to index action' do get :new expect(response).to redirect_to( - '/alaveteli_pro/batch_request_authority_searches' + '/pro/batch_request_authority_searches' ) end end diff --git a/spec/views/alaveteli_pro/info_requests/new.html.erb_spec.rb b/spec/views/alaveteli_pro/info_requests/new.html.erb_spec.rb index eb295537cb..e9a5ab0b67 100644 --- a/spec/views/alaveteli_pro/info_requests/new.html.erb_spec.rb +++ b/spec/views/alaveteli_pro/info_requests/new.html.erb_spec.rb @@ -36,7 +36,7 @@ def assign_variables assign_variables render expect(rendered). - to match(/data-search-url="\/alaveteli_pro\/public_bodies"/) + to match(/data-search-url="\/pro\/public_bodies"/) end it "includes a hidden field for the body id" do