Sha256: eb04d925c4179e3e47a306af3a7597e81336782f9298d807d7a984aa271656bc

Contents?: true

Size: 1016 Bytes

Versions: 11

Compression:

Stored size: 1016 Bytes

Contents

shared_examples_for 'a message' do |flags|

  subject(:test_message) do
    unless described_class.names.include?(:flag)
      described_class.int32LE(:flag, {:value => Net::NTLM::DEFAULT_FLAGS[:TYPE1] })
    end
    described_class.new
  end

  it { should respond_to :has_flag? }
  it { should respond_to :set_flag }
  it { should respond_to :dump_flags }
  it { should respond_to :encode64 }
  it { should respond_to :decode64 }
  it { should respond_to :head_size }
  it { should respond_to :data_size }
  it { should respond_to :size }
  it { should respond_to :security_buffers }
  it { should respond_to :deflag }
  it { should respond_to :data_edge }

  flags.each do |flag|
    it "should be able to check if the #{flag} flag is set" do
      expect(test_message.has_flag?(flag)).to be(true)
    end
  end


  it 'should be able to set a new flag' do
    test_message.set_flag(:DOMAIN_SUPPLIED)
    expect(test_message.has_flag?(:DOMAIN_SUPPLIED)).to be(true)
  end


end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.1/spec/support/shared/examples/net/ntlm/message_shared.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/message_shared.rb
rubyntlm-0.6.1 spec/support/shared/examples/net/ntlm/message_shared.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/message_shared.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/message_shared.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/message_shared.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/message_shared.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/message_shared.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/message_shared.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/message_shared.rb
rubyntlm-0.6.0 spec/support/shared/examples/net/ntlm/message_shared.rb