Sha256: aa96fe96e36acedc59e6da602e61e722d65ea09d61fa6c39c6e4a68b0f01043d

Contents?: true

Size: 1.02 KB

Versions: 9

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe RubyRabbitmqJanus::RRJAdmin, type: :request,
                                      level: :admin,
                                      broken: true,
                                      name: :add_token do
  let(:type) { 'admin::add_token' }
  let(:parameter) { { 'token' => [*('a'..'z'), *('0'..'9')].sample(24).join } }

  describe 'request #add_token' do
    context 'when option token is disabled' do
      before { helper_janus_instance_without_token }

      let(:number) { '1' }
      let(:exception_class) { RubyRabbitmqJanus::Errors::Janus::Responses::Unknown }
      let(:exception_message) { '[490] Reason : Stored-Token based authentication disabled' }

      include_examples 'when transaction admin exception'
    end

    context 'when option token is enabled' do
      before { helper_janus_instance_with_token }

      let(:number) { '2' }
      let(:schema_success) { 'base::success' }

      it_behaves_like 'when transaction admin success'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-4.0.0.pre.949167646 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.946892338 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.946565704 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939149205 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939137013 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939133437 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939119110 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.939113634 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.850041590 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb