Sha256: 00b71515da95eac62ee8388eba2a1ee8144eed0f17dc5013a8fe051c41c42a6d

Contents?: true

Size: 1.99 KB

Versions: 51

Compression:

Stored size: 1.99 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe RubyRabbitmqJanus::Tools::Replaces::Replace, type: :tools, name: :replace do
  subject(:replace) do
    # Get request JSON file
    rqe = RubyRabbitmqJanus::Tools::Requests.instance.requests['test::type']
    # Open request file
    described_class.new(JSON.parse(File.read(rqe)), options)
  end

  context 'when replace classic element' do
    let(:options) { { 'replace' => {}, 'add' => {} } }

    context 'with ransform request' do
      it { expect(replace.transform_request).to be_kind_of(Hash) }
    end

    context 'with ransform request session_id' do
      include_examples 'test replace in request nil', 'session_id'
    end

    context 'with ransform request transaction' do
      include_examples 'test replace in request nil', 'transaction'
    end

    context 'with ransform request handle_id' do
      include_examples 'test replace in request nil', 'handle_id'
    end

    context 'with ransform request plugin' do
      include_examples 'test replace in request nil', 'plugin'
    end

    context 'with ransform request candidate' do
      include_examples 'test replace in request nil', 'candidate'
    end

    context 'with ransform request candidates' do
      include_examples 'test replace in request nil', 'candidates'
    end

    context 'with ransform request audio' do
      include_examples 'test replace in request nil', 'audio'
    end

    context 'with ransform request plugin1' do
      include_examples 'test replace in request nil', 'plugin1'
    end

    context 'with ransform request first_plugin' do
      include_examples 'test replace in request nil', 'first_plugin'
    end

    context 'with ransform request sdp' do
      include_examples 'test replace in request nil', 'sdp'
    end

    context 'with ransform request debug' do
      include_examples 'test replace in request nil', 'debug'
    end

    context 'with ransform request level' do
      include_examples 'test replace in request nil', 'level'
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-3.0.0.pre.336 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.335 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.334 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.330 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.328 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.327 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.322 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.320 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.319 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.318 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.317 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.316 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.315 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.314 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.312 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.310 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.309 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.308 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
ruby_rabbitmq_janus-2.7.2.pre.307 spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb