Sha256: 858794974a2a7a97a93baaf883c287c518c24227cb6a36a0c4fde5ac037f9190

Contents?: true

Size: 821 Bytes

Versions: 14

Compression:

Stored size: 821 Bytes

Contents

RSpec.describe RubySMB::Nbss::SessionHeader do
  subject(:session_header) { described_class.new }

  it { is_expected.to respond_to :session_packet_type }
  it { is_expected.to respond_to :flags }
  it { is_expected.to respond_to :packet_length }

  it 'is big endian' do
    expect(described_class.fields.instance_variable_get(:@hints)[:endian]).to eq :big
  end

  describe '#session_packet_type' do
    it 'is a 8-bit Unsigned Integer' do
      expect(session_header.session_packet_type).to be_a BinData::Uint8
    end
  end

  describe '#flags' do
    it 'is a 7-bit Unsigned Integer' do
      expect(session_header.flags).to be_a BinData::Bit7
    end
  end

  describe '#packet_length' do
    it 'is a 17-bit Unsigned Integer' do
      expect(session_header.packet_length).to be_a BinData::Bit17
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby_smb-2.0.2 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-2.0.1 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-2.0.0 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-1.1.0 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-1.0.5 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-1.0.4 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-1.0.3 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-1.0.2 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-1.0.1 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-1.0.0 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-0.0.24 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-0.0.23 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-0.0.22 spec/lib/ruby_smb/nbss/session_header_spec.rb
ruby_smb-0.0.21 spec/lib/ruby_smb/nbss/session_header_spec.rb