diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-02-03 22:49:56 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-02-03 22:49:56 +0000 |
commit | c0eeb9f1e20af2a5c4f77c71fd1236e6c1584f05 (patch) | |
tree | e92a7bfd6def8b7fce289476c406a8101f9a2681 /actionpack/test | |
parent | 9f030acf22696a476578e9ccde9984fa1b86f02c (diff) | |
parent | 34a37ea9e8265972a93f0c4f62e44308c27751dd (diff) | |
download | rails-c0eeb9f1e20af2a5c4f77c71fd1236e6c1584f05.tar.gz rails-c0eeb9f1e20af2a5c4f77c71fd1236e6c1584f05.tar.bz2 rails-c0eeb9f1e20af2a5c4f77c71fd1236e6c1584f05.zip |
Merge commit 'mainstream/master'
Conflicts:
railties/doc/guides/html/action_mailer_basics.html
railties/doc/guides/html/getting_started_with_rails.html
railties/doc/guides/html/i18n.html
railties/doc/guides/source/action_mailer_basics.txt
railties/doc/guides/source/getting_started_with_rails.txt
railties/doc/guides/source/i18n.txt
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/rescue_test.rb | 25 | ||||
-rw-r--r-- | actionpack/test/fixtures/public/500.da.html | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb index 9f6b45f065..85c2a4c1bb 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -199,6 +199,31 @@ class RescueControllerTest < ActionController::TestCase end end + def test_rescue_action_in_public_with_localized_error_file + # Reload and register danish language for testing + I18n.reload! + I18n.backend.store_translations 'da', {} + + # Ensure original are still the same since we are reindexing view paths + assert_equal ORIGINAL_LOCALES, I18n.available_locales.map(&:to_s).sort + + # Change locale + old_locale = I18n.locale + I18n.locale = :da + + with_rails_root FIXTURE_PUBLIC do + with_all_requests_local false do + get :raises + end + end + + assert_response :internal_server_error + body = File.read("#{FIXTURE_PUBLIC}/public/500.da.html") + assert_equal body, @response.body + ensure + I18n.locale = old_locale + end + def test_rescue_action_in_public_with_error_file with_rails_root FIXTURE_PUBLIC do with_all_requests_local false do diff --git a/actionpack/test/fixtures/public/500.da.html b/actionpack/test/fixtures/public/500.da.html new file mode 100644 index 0000000000..a497c13656 --- /dev/null +++ b/actionpack/test/fixtures/public/500.da.html @@ -0,0 +1 @@ +500 localized error fixture |