Sha256: 41d94a04165bd8f3ec1f76a4a875c79f975111505e46f1b15c164e500bd27953

Contents?: true

Size: 660 Bytes

Versions: 11

Compression:

Stored size: 660 Bytes

Contents

require 'spec_helper'

RSpec.describe RubySMB::Dispatcher::Base do

  subject(:dispatcher) { described_class.new }

  describe '#nbss' do
    it 'returns the size of the packet to the packet in 4 bytes' do
      packet = RubySMB::SMB1::Packet::NegotiateRequest.new
      packet_size = packet.do_num_bytes
      expect( dispatcher.nbss(packet) ).to eq "\x00\x00\x00\x23"
    end
  end

  it 'raises NotImplementedError on #send_packet' do
    expect{ dispatcher.send_packet("foo") }.to raise_error(NotImplementedError)
  end

  it 'raises NotImplementedError on #recv_packet' do
    expect{ dispatcher.recv_packet }.to raise_error(NotImplementedError)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby_smb-0.0.18 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.17 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.16 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.15 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.14 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.13 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.12 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.11 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.10 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.9 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb
ruby_smb-0.0.8 spec/lib/ruby_smb/dispatcher/dispatcher_base_spec.rb