Skip to content

Commit

Permalink
Update routes
Browse files Browse the repository at this point in the history
  • Loading branch information
martikat committed Dec 2, 2024
1 parent 71bb2f9 commit 7f8564e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 37 deletions.
11 changes: 3 additions & 8 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
58 changes: 29 additions & 29 deletions spec/system/page_tier_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7f8564e

Please sign in to comment.