Sha256: dcb07db38eb61bea01e9090d653194f6955d48d1a17220a35575d022d2fe4528
Contents?: true
Size: 1.06 KB
Versions: 10
Compression:
Stored size: 1.06 KB
Contents
RSpec.describe RubySMB::Dcerpc::Svcctl::ChangeServiceConfigWResponse do subject(:packet) { described_class.new } it { is_expected.to respond_to :dw_tag_id } it { is_expected.to respond_to :error_status } it 'is little endian' do expect(described_class.fields.instance_variable_get(:@hints)[:endian]).to eq :little end describe '#dw_tag_id' do it 'is a NdrLpDword structure' do expect(packet.dw_tag_id).to be_a RubySMB::Dcerpc::Ndr::NdrLpDword end end describe '#error_status' do it 'is a 32-bit unsigned integer' do expect(packet.error_status).to be_a BinData::Uint32le end end describe '#initialize_instance' do it 'sets #opnum to CHANGE_SERVICE_CONFIG_W constant' do expect(packet.opnum).to eq(RubySMB::Dcerpc::Svcctl::CHANGE_SERVICE_CONFIG_W) end end it 'reads its own binary representation and outputs the same packet' do packet = described_class.new( dw_tag_id: 4, error_status: 1 ) binary = packet.to_binary_s expect(described_class.read(binary)).to eq(packet) end end
Version data entries
10 entries across 10 versions & 1 rubygems