Sha256: 10071aeb1a890926198bb5869960b6dbfb98f7274e34d7bef87b6e282687ce7a

Contents?: true

Size: 475 Bytes

Versions: 40

Compression:

Stored size: 475 Bytes

Contents

require 'spec_helper'

describe Net::NTLM::EncodeUtil do

  context '#encode_utf16le' do
    it 'should convert an ASCII string to UTF' do
      expect(Net::NTLM::EncodeUtil.encode_utf16le('Test'.encode(::Encoding::ASCII_8BIT).freeze)).to eq("T\x00e\x00s\x00t\x00")
    end
  end

  context '#decode_utf16le' do
    it 'should convert a UTF string to ASCII' do
      expect(Net::NTLM::EncodeUtil.decode_utf16le("T\x00e\x00s\x00t\x00".freeze)).to eq('Test')
    end
  end
end

Version data entries

40 entries across 32 versions & 3 rubygems

Version Path
rubyntlm-0.6.5 spec/lib/net/ntlm/encode_util_spec.rb
rubyntlm-0.6.4 spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/rubyntlm-0.6.3/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/rubyntlm-0.6.3/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/rubyntlm-0.6.3/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
rubyntlm-0.6.3 spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/encode_util_spec.rb