Skip to content

Commit 93a0034

Browse files
committed
Add spec to ensure middleware does not prevent default 404 rendering from Rails
1 parent ebddc88 commit 93a0034

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/inertia/request_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,12 @@
154154
end
155155
end
156156
end
157+
158+
describe 'a non existent route' do
159+
it 'raises a 404 exception' do
160+
expect {
161+
get '/non_existent_route', headers: { 'X-Inertia' => true }
162+
}.to raise_error(ActionController::RoutingError, /No route matches/)
163+
end
164+
end
157165
end

0 commit comments

Comments
 (0)