add "assert_response 401" to tests (#16107)

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4012917
explicitly set encoding UTF-8 (#16107)

Default Ruby source file encoding changed in Ruby 2.0.0.
https://bugs.ruby-lang.org/issues/6679

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4012918