Sha256: 1537f5a30d33c7eaa7c6f22553015a64a7cbda2f306422f6b3ddcbd06401183b

Contents?: true

Size: 872 Bytes

Versions: 56

Compression:

Stored size: 872 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe 'RubyRabbitmqJanus::RRJAdmin -- set_max_nack_queue', type: :request,
                                                              level: :admin,
                                                              name: :set_max_nack_queue do
  before do
    help_admin_prepare
    help_admin_request_tested(parameters)
  end

  let(:instance) { { 'instance' => RubyRabbitmqJanus::Models::JanusInstance.find('1').id.to_s } }
  let(:type) { 'admin::set_max_nack_queue' }
  let(:parameters) { { 'max_nack_queue' => max } }

  context 'when max is 0' do
    let(:max) { 0 }

    it { expect(@transaction.to_json).to match_json_schema('base::success') }
  end

  context 'when max is random' do
    let(:max) { rand(1..546_465) }

    it { expect(@transaction.to_json).to match_json_schema('base::success') }
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

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