spec/lib/net/ntlm_spec.rb in rubyntlm-0.6.4 vs spec/lib/net/ntlm_spec.rb in rubyntlm-0.6.5
- old
+ new
@@ -57,9 +57,17 @@
it 'should return the correct ntlmv2 hash' do
expect(Net::NTLM::ntlmv2_hash(user, passwd, domain)).to eq(["04b8e0ba74289cc540826bab1dee63ae"].pack("H*"))
end
end
+ context 'when the username contains non-ASCI characters' do
+ let(:user) { 'юзер' }
+
+ it 'should return the correct ntlmv2 hash' do
+ expect(Net::NTLM::ntlmv2_hash(user, passwd, domain, { unicode: true })).to eq(["a0f4b914a37faeaee884b6b04a20faf0"].pack("H*"))
+ end
+ end
+
it 'should generate an lm_response' do
expect(Net::NTLM::lm_response(
{
:lm_hash => Net::NTLM::lm_hash(passwd),
:challenge => challenge