From 7f8564ef7fc6e88d654f75bd277f27fd5371c70c Mon Sep 17 00:00:00 2001 From: martikat <78093815+martikat@users.noreply.github.com> Date: Mon, 2 Dec 2024 09:24:02 +0000 Subject: [PATCH 1/2] Update routes --- config/routes.rb | 11 ++----- spec/system/page_tier_spec.rb | 58 +++++++++++++++++------------------ 2 files changed, 32 insertions(+), 37 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index c3ab9f98..8723cfd6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,14 +15,9 @@ resources :settings, only: %i[create] - get ':section', to: 'pages#index', format: 'html' - get ':section/:slug', to: 'pages#show', format: 'html' - get ':section/:overview/:slug', to: 'pages#show', format: 'html' - - # Handle unmatched route - get '/*unmatched_route', to: 'errors#not_found', via: :get, format: 'html' - get '/*unmatched_route/*unmatched_route', to: 'errors#not_found', via: :get, format: 'html' - get '/*unmatched_route/*unmatched_route/*unmatched_route', to: 'errors#not_found', via: :get, format: 'html' + get ':section', to: 'pages#index' + get ':section/:slug', to: 'pages#show' + get ':section/:overview/:slug', to: 'pages#show' post 'change', to: 'hook#change' post 'release', to: 'hook#release' diff --git a/spec/system/page_tier_spec.rb b/spec/system/page_tier_spec.rb index a1d739eb..870be84d 100644 --- a/spec/system/page_tier_spec.rb +++ b/spec/system/page_tier_spec.rb @@ -103,33 +103,33 @@ end end - describe 'First tier when route is in incorrect format' do - before do - visit '/randompage.yml' - end - - it 'has a heading' do - expect(page).to have_text('Page not found') - end - end - - describe 'Second tier when route is in incorrect format' do - before do - visit '/route/randompage.yml' - end - - it 'has a heading' do - expect(page).to have_text('Page not found') - end - end - - describe 'Third tier when route is in incorrect format' do - before do - visit '/route/route/randompage.yml' - end - - it 'has a heading' do - expect(page).to have_text('Page not found') - end - end + # describe 'First tier when route is in incorrect format' do + # before do + # visit '/randompage.yml' + # end + + # it 'has a heading' do + # expect(page).to have_text('Page not found') + # end + # end + + # describe 'Second tier when route is in incorrect format' do + # before do + # visit '/route/randompage.yml' + # end + + # it 'has a heading' do + # expect(page).to have_text('Page not found') + # end + # end + + # describe 'Third tier when route is in incorrect format' do + # before do + # visit '/route/route/randompage.yml' + # end + + # it 'has a heading' do + # expect(page).to have_text('Page not found') + # end + # end end From e34955ef0cb3d1ac74e6e2627d93640745ef140d Mon Sep 17 00:00:00 2001 From: martikat <78093815+martikat@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:41:22 +0000 Subject: [PATCH 2/2] Remove spec --- spec/system/page_tier_spec.rb | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/spec/system/page_tier_spec.rb b/spec/system/page_tier_spec.rb index 870be84d..90f973c9 100644 --- a/spec/system/page_tier_spec.rb +++ b/spec/system/page_tier_spec.rb @@ -102,34 +102,4 @@ end end end - - # describe 'First tier when route is in incorrect format' do - # before do - # visit '/randompage.yml' - # end - - # it 'has a heading' do - # expect(page).to have_text('Page not found') - # end - # end - - # describe 'Second tier when route is in incorrect format' do - # before do - # visit '/route/randompage.yml' - # end - - # it 'has a heading' do - # expect(page).to have_text('Page not found') - # end - # end - - # describe 'Third tier when route is in incorrect format' do - # before do - # visit '/route/route/randompage.yml' - # end - - # it 'has a heading' do - # expect(page).to have_text('Page not found') - # end - # end end