summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test/authentication_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/api_test/authentication_test.rb')
-rw-r--r--test/integration/api_test/authentication_test.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/integration/api_test/authentication_test.rb b/test/integration/api_test/authentication_test.rb
index 16c589d3e..b8c9e0746 100644
--- a/test/integration/api_test/authentication_test.rb
+++ b/test/integration/api_test/authentication_test.rb
@@ -41,11 +41,8 @@ class Redmine::ApiTest::AuthenticationTest < Redmine::ApiTest::Base
end
def test_invalid_utf8_credentials_should_not_trigger_an_error
- invalid_utf8 = "\x82"
- if invalid_utf8.respond_to?(:force_encoding)
- invalid_utf8.force_encoding('UTF-8')
- assert !invalid_utf8.valid_encoding?
- end
+ invalid_utf8 = "\x82".force_encoding('UTF-8')
+ assert !invalid_utf8.valid_encoding?
assert_nothing_raised do
get '/users/current.xml', {}, credentials(invalid_utf8, "foo")
end