Sha256: f10f6ba6248163fc9f8c5285ffb9fdb9841ccc531f47f3d95bfdc0ff53f0127e

Contents?: true

Size: 770 Bytes

Versions: 61

Compression:

Stored size: 770 Bytes

Contents

RSpec.describe RubySMB::SMB1::BitField::TransFlags 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

61 entries across 61 versions & 1 rubygems

Version Path
ruby_smb-3.3.12 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.11 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.10 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.9 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.7 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.6 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.5 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.4 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.3 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.2 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.1 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.3.0 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.2.8 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.2.7 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.2.6 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.2.5 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.2.4 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.2.3 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.2.2 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb
ruby_smb-3.2.1 spec/lib/ruby_smb/smb1/bit_field/trans_flags_spec.rb