Sha256: cdf6e1f9ae090e792eb44c6e656d71abc0420cb7fe5659863051ab6d17433897

Contents?: true

Size: 991 Bytes

Versions: 22

Compression:

Stored size: 991 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe RubyRabbitmqJanus::RRJAdmin, type: :request,
                                      level: :admin,
                                      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

22 entries across 22 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-4.0.1 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.1.pre.1265973744 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.1.pre.1265506307 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.1.pre.1265140558 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001345090 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001181479 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001132533 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001107243 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-4.0.0.pre.1001043172 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.1 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.0 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.387 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.385 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.384 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.382 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.366 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.364 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.358 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb
ruby_rabbitmq_janus-3.0.0.pre.354 spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb