Sha256: fe076e263d97ed41a5322b723489bcb4bca7759007ab0111f45cdabb88a86274

Contents?: true

Size: 973 Bytes

Versions: 24

Compression:

Stored size: 973 Bytes

Contents

RSpec.describe RubySMB::Dcerpc::Samr::SamrSetInformationUser2Response do
  subject(:packet) { described_class.new }

  it { is_expected.to respond_to :error_status }
  it { is_expected.to respond_to :opnum }

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

  it 'is a BinData::Record' do
    expect(packet).to be_a(BinData::Record)
  end

  describe '#error_status' do
    it 'is a NdrUint32 structure' do
      expect(packet.error_status).to be_a RubySMB::Dcerpc::Ndr::NdrUint32
    end
  end

  describe '#initialize_instance' do
    it 'sets #opnum to SAMR_SET_INFORMATION_USER2 constant' do
      expect(packet.opnum).to eq(RubySMB::Dcerpc::Samr::SAMR_SET_INFORMATION_USER2)
    end
  end

  it 'reads itself' do
    new_class = described_class.new(error_status: 0x11223344)
    expect(packet.read(new_class.to_binary_s)).to eq(
      {
        error_status: 0x11223344
      }
    )
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

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