Sha256: beb0ec24374f0927b4b7c9fa8bc570a0e369b0fc312df17d7e60428e4d01d3e1

Contents?: true

Size: 854 Bytes

Versions: 44

Compression:

Stored size: 854 Bytes

Contents

require 'spec_helper'

describe Net::NTLM::FieldSet do

  fields = []

  it_behaves_like 'a fieldset', fields

  subject(:fieldset_class) do
    Class.new(Net::NTLM::FieldSet)
  end

  context 'an instance' do
    subject(:fieldset_object) do
      fieldset_class.string(:test_string, { :value => 'Test', :active => true, :size => 4})
      fieldset_class.string(:test_string2, { :value => 'Foo', :active => true, :size => 3})
      fieldset_class.new
    end

    it 'should serialize all the fields' do
      expect(fieldset_object.serialize).to eq('TestFoo')
    end

    it 'should parse a string across the fields' do
      fieldset_object.parse('FooBarBaz')
      expect(fieldset_object.serialize).to eq('FooBarB')
    end

    it 'should return an aggregate size of all the fields' do
      expect(fieldset_object.size).to eq(7)
    end
  end
end

Version data entries

44 entries across 36 versions & 3 rubygems

Version Path
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.1.4.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/field_set_spec.rb
rubyntlm-0.6.2 spec/lib/net/ntlm/field_set_spec.rb