diff options
-rw-r--r-- | app/controllers/pages_controller.rb | 2 | ||||
-rw-r--r-- | test/integration/regression/key_discovery_test.rb (renamed from test/integration/key_discovery_test.rb) | 0 | ||||
-rw-r--r-- | test/integration/regression/provider_info_test.rb | 20 |
3 files changed, 22 insertions, 0 deletions
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index b9c601a..4508450 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -9,6 +9,8 @@ class PagesController < ApplicationController def show @show_navigation = false render page_name + rescue ActionView::MissingTemplate + raise ActionController::RoutingError.new('Not Found') end private diff --git a/test/integration/key_discovery_test.rb b/test/integration/regression/key_discovery_test.rb index 2a38a78..2a38a78 100644 --- a/test/integration/key_discovery_test.rb +++ b/test/integration/regression/key_discovery_test.rb diff --git a/test/integration/regression/provider_info_test.rb b/test/integration/regression/provider_info_test.rb new file mode 100644 index 0000000..2aaf6f6 --- /dev/null +++ b/test/integration/regression/provider_info_test.rb @@ -0,0 +1,20 @@ +require 'test_helper' + +class ProviderInfoTest < BrowserIntegrationTest + + def test_404_on_missing_page + visit '/about' + assert_equal 404, status_code + end + + def test_404_on_missing_language_page + visit '/de/about' + assert_equal 404, status_code + end + + def test_404_en_fallback + visit '/de/bye' + assert_equal 200, status_code + end + +end |