##// END OF EJS Templates
explicitly set encoding UTF-8 (#16107)...
Toshi MARUYAMA -
r12643:c6f71f727bc7
parent child
Show More
@@ -41,8 +41,13 class Redmine::ApiTest::AuthenticationTest < Redmine::ApiTest::Base
41 end
41 end
42
42
43 def test_invalid_utf8_credentials_should_not_trigger_an_error
43 def test_invalid_utf8_credentials_should_not_trigger_an_error
44 invalid_utf8 = "\x82"
45 if invalid_utf8.respond_to?(:force_encoding)
46 invalid_utf8.force_encoding('UTF-8')
47 assert !invalid_utf8.valid_encoding?
48 end
44 assert_nothing_raised do
49 assert_nothing_raised do
45 get '/users/current.xml', {}, credentials("\x82", "foo")
50 get '/users/current.xml', {}, credentials(invalid_utf8, "foo")
46 end
51 end
47 end
52 end
48
53
General Comments 0
You need to be logged in to leave comments. Login now