Sha256: 7b239b9d174a3f2e1c3c8ff2ee783bd6743598a181dbeee5288a5e495e72b67c
Contents?: true
Size: 1.36 KB
Versions: 30
Compression:
Stored size: 1.36 KB
Contents
RSpec.describe RubySMB::Dcerpc::Svcctl::CreateServiceWResponse do subject(:packet) { described_class.new } it { is_expected.to respond_to :lp_dw_tag_id } it { is_expected.to respond_to :lp_sc_handle } 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 '#lp_dw_tag_id' do it 'is a NdrUint32Ptr' do expect(packet.lp_dw_tag_id).to be_a RubySMB::Dcerpc::Ndr::NdrUint32Ptr end end describe '#lp_sc_handle' do it 'is a ScRpcHandle structure' do expect(packet.lp_sc_handle).to be_a RubySMB::Dcerpc::Svcctl::ScRpcHandle end end describe '#error_status' do it 'is a NdrUint32' do expect(packet.error_status).to be_a RubySMB::Dcerpc::Ndr::NdrUint32 end end describe '#initialize_instance' do it 'sets #opnum to CREATE_SERVICE_W constant' do expect(packet.opnum).to eq(RubySMB::Dcerpc::Svcctl::CREATE_SERVICE_W) end end it 'reads its own binary representation and outputs the same packet' do packet = described_class.new( lp_dw_tag_id: 3, lp_sc_handle: {context_handle_attributes: 0, context_handle_uuid: '367abb81-9844-35f1-ad32-98f038001003'}, error_status: 3 ) binary = packet.to_binary_s expect(described_class.read(binary)).to eq(packet) end end
Version data entries
30 entries across 30 versions & 1 rubygems