Sha256: 69d8668dd978f713bb90a1e21ff53ffa9b20b9c8451c32eaccee192ae20637d8

Contents?: true

Size: 910 Bytes

Versions: 31

Compression:

Stored size: 910 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe RubyRabbitmqJanus::Janus::Responses::Standard, type: :responses,
                                                        name: :standard do
  let(:response) { described_class.new(message) }

  describe '#plugin_data' do
    context 'with no plugindata' do
      let(:message) { {} }

      it { expect { response.plugin_data }.to raise_error(RubyRabbitmqJanus::Errors::Janus::Responses::Standard::Plugin) }
    end

    context 'with no data' do
      let(:message) { { 'plugindata' => {} } }

      it { expect { response.plugin_data }.to raise_error(RubyRabbitmqJanus::Errors::Janus::Responses::Standard::PluginData) }
    end

    context 'with a session' do
      let(:message) { { 'plugindata' => { 'plugin' => 'fake', 'data' => { 'echotest' => 'event' } } } }

      it { expect(response.plugin_data).to be_kind_of(Hash) }
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-4.0.1 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.1.pre.1265973744 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.1.pre.1265506307 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.1.pre.1265140558 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001345090 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001181479 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001132533 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001107243 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001043172 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.949167646 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.946892338 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.946565704 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939149205 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939137013 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939133437 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939119110 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939113634 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.850041590 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb
ruby_rabbitmq_janus-3.0.1 spec/ruby_rabbitmq_janus/janus/responses/standard_plugin_data_spec.rb