Sha256: 22c4ad3b7d49e216308827c45c6a01974b19474716c16601d2596324b2e22894

Contents?: true

Size: 901 Bytes

Versions: 32

Compression:

Stored size: 901 Bytes

Contents

# encoding: UTF-8

require 'winrm/psrp/message'
require 'winrm/psrp/message_data'

describe WinRM::PSRP::MessageData do
  describe '#parse' do
    let(:raw_data) { 'raw_data' }
    let(:message) do
      WinRM::PSRP::Message.new(
        '00000000-0000-0000-0000-000000000000',
        message_type,
        raw_data
      )
    end

    subject { WinRM::PSRP::MessageData.parse(message) }

    context 'defined message type' do
      let(:message_type) { WinRM::PSRP::Message::MESSAGE_TYPES[:pipeline_output] }

      it 'creates correct message data type' do
        expect(subject).to be_a(WinRM::PSRP::MessageData::PipelineOutput)
      end
    end

    context 'undefined message type' do
      let(:message_type) { WinRM::PSRP::Message::MESSAGE_TYPES[:pipeline_input] }

      it 'returns nill' do
        expect(subject).to be nil
      end
    end
  end
end

Version data entries

32 entries across 29 versions & 3 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.1.4.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data_spec.rb