Sha256: e5f77e7f807c64571d25590a93bd16ae897ba3dffcd87beb9909476c0f66dadd

Contents?: true

Size: 1.11 KB

Versions: 34

Compression:

Stored size: 1.11 KB

Contents

RSpec.describe RubySMB::Dcerpc::PrintSystem::DriverContainer do
  subject(:struct) { described_class.new }

  it { is_expected.to respond_to :level }
  it { is_expected.to respond_to :tag }
  it { is_expected.to respond_to :driver_info }

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

  describe '#level' do
    it 'is a NdrUint32' do
      expect(struct.level).to be_a RubySMB::Dcerpc::Ndr::NdrUint32
    end
  end

  describe '#tag' do
    it 'is a NdrUint32' do
      expect(struct.tag).to be_a RubySMB::Dcerpc::Ndr::NdrUint32
    end
  end

  it 'reads its own binary representation and outputs the same struct' do
    struct = described_class.new(
      level: 2,
      tag: 0,
      driver_info: RubySMB::Dcerpc::PrintSystem::DriverInfo2.new(
        c_version: 0,
        p_name: 'p_name',
        p_environment: 'p_environment',
        p_driver_path: 'p_driver_path',
        p_data_file: 'p_data_file',
        p_config_file: 'p_config_file'
      )
    )
    binary = struct.to_binary_s
    expect(described_class.read(binary)).to eq(struct)
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

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