Sha256: 4e9a7773af9649f3d2eff44eb8fb7583e01ca2bb176d157367400ee81bb47e3d

Contents?: true

Size: 1.01 KB

Versions: 63

Compression:

Stored size: 1.01 KB

Contents

require 'spec_helper'

RSpec.describe RubySMB::SMB1::Packet::EchoRequest do
  subject(:packet) { described_class.new }

  describe '#smb_header' do
    subject(:header) { packet.smb_header }

    it 'is a standard SMB Header' do
      expect(header).to be_a RubySMB::SMB1::SMBHeader
    end

    it 'should have the command set to SMB_COM_NEGOTIATE' do
      expect(header.command).to eq RubySMB::SMB1::Commands::SMB_COM_ECHO
    end

    it 'should not have the response flag set' do
      expect(header.flags.reply).to eq 0
    end
  end

  describe '#parameter_block' do
    subject(:parameter_block) { packet.parameter_block }

    it { is_expected.to respond_to :echo_count }

    it 'is a standard ParameterBlock' do
      expect(parameter_block).to be_a RubySMB::SMB1::ParameterBlock
    end
  end

  describe '#data_block' do
    subject(:data_block) { packet.data_block }

    it { is_expected.to respond_to :data }

    it 'is a standard DataBlock' do
      expect(data_block).to be_a RubySMB::SMB1::DataBlock
    end
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
ruby_smb-2.0.9 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-2.0.8 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-2.0.7 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-2.0.6 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-2.0.5 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-2.0.4 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-2.0.3 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-2.0.2 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-2.0.1 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-2.0.0 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-1.1.0 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-1.0.5 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-1.0.4 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-1.0.3 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-1.0.2 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-1.0.1 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-1.0.0 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-0.0.24 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-0.0.23 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
ruby_smb-0.0.22 spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb