Sha256: 279891a30c49162c6fe470a9272474eb697b8a49ef112dc7382c8f818a2dfac6

Contents?: true

Size: 771 Bytes

Versions: 3

Compression:

Stored size: 771 Bytes

Contents

RSpec.describe RubySMB::SMB1::BitField::Trans2Flags do
  subject(:flags) { described_class.new }

  it { is_expected.to respond_to :no_response }
  it { is_expected.to respond_to :disconnect }

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

  describe '#no_response' do
    it 'should be a 1-bit field per the SMB spec' do
      expect(flags.no_response).to be_a BinData::Bit1
    end

    it_behaves_like 'bit field with one flag set', :no_response, 'C', 0x02
  end

  describe '#disconnect' do
    it 'should be a 1-bit field per the SMB spec' do
      expect(flags.disconnect).to be_a BinData::Bit1
    end

    it_behaves_like 'bit field with one flag set', :disconnect, 'C', 0x01
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_smb-0.0.21 spec/lib/ruby_smb/smb1/bit_field/trans2_flags_spec.rb
ruby_smb-0.0.20 spec/lib/ruby_smb/smb1/bit_field/trans2_flags_spec.rb
ruby_smb-0.0.19 spec/lib/ruby_smb/smb1/bit_field/trans2_flags_spec.rb