mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add testcase for non english filename. Related to #2982.
This commit is contained in:
parent
a9bebaedb9
commit
1ec5c2674f
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
# encoding: utf-8
|
||||
require 'abstract_unit'
|
||||
|
||||
module StaticTests
|
||||
|
@ -30,6 +31,10 @@ module StaticTests
|
|||
assert_html "/foo/index.html", get("/foo")
|
||||
end
|
||||
|
||||
def test_served_static_file_with_non_english_filename
|
||||
assert_html "means hello in Japanese\n", get("/foo/#{Rack::Utils.escape("こんにちは.html")}")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def assert_html(body, response)
|
||||
|
@ -53,4 +58,4 @@ class StaticTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
include StaticTests
|
||||
end
|
||||
end
|
||||
|
|
1
actionpack/test/fixtures/public/foo/こんにちは.html
vendored
Normal file
1
actionpack/test/fixtures/public/foo/こんにちは.html
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
means hello in Japanese
|
Loading…
Reference in a new issue