Sha256: c527bf6f96e7c7b17038a66d114163e267e8d032352e3e56055c18ba1c68c44c

Contents?: true

Size: 1.51 KB

Versions: 19

Compression:

Stored size: 1.51 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe RubyRabbitmqJanus::RRJ, type: :request,
                                 level: :peer,
                                 broken: true,
                                 name: :offer do
  before do
    helper_janus_instance_without_token
    helper_janus_instance_create_handle
  end

  let(:type) { 'peer::offer' }
  let(:number) { '1' }

  shared_context 'when success' do
    let(:parameter) { { 'sdp' => SDP_OFFER } }
  end

  shared_context 'when failed' do
    let(:parameter) { {} }
    let(:exception_class) { RubyRabbitmqJanus::Errors::Janus::Responses::JSEPInvalidSDP }
    let(:exception_message) { "[465] Reason : Invalid SDP (doesn't start with v=)" }
  end

  describe 'request #offer' do
    context 'when queue is exclusive' do
      context 'with parameter is correct' do
        let(:schema_success) { type }

        include_context 'when success'

        include_examples 'when transaction exclusive success'
      end

      context 'with parameter is empty' do
        include_context 'when failed'

        include_examples 'when transaction exclusive exception'
      end
    end

    context 'when queue is not exclusive' do
      context 'with parameter is correct' do
        include_context 'when success'

        include_examples 'when transaction not exclusive success'
      end

      context 'with parameter is empty' do
        include_context 'when failed'

        include_examples 'when transaction not exclusive exception'
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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