Sha256: 146f62acf19610bc65757a0e8f4b165075677f1034e1dcc2d70a3ff9b0a5d793

Contents?: true

Size: 780 Bytes

Versions: 8

Compression:

Stored size: 780 Bytes

Contents

# frozen_string_literal: true

require 'basquiat/adapters/rabbitmq_adapter'

RSpec.describe Basquiat::Adapters::RabbitMq::AutoAcknowledge do
  let(:adapter) { Basquiat::Adapters::RabbitMq.new }
  let(:base_options) do
    { connection: { hosts: [ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_ADDR') { 'localhost' }],
                    port:  ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_PORT') { 5672 } },
      publisher:  { persistent: true },
      requeue:    { enabled: false } }
  end

  before(:each) do
    adapter.adapter_options(base_options)
  end

  after(:each) { remove_queues_and_exchanges(adapter) }

  it 'set manual_ack to false' do
    # Setup the strategy
    adapter.strategy
    expect(adapter.send(:options)[:consumer][:manual_ack]).to be_falsey
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
basquiat-1.6.0 spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb
basquiat-1.5.2 spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb
basquiat-1.5.1 spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb
basquiat-1.5.0 spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb
basquiat-1.4.0 spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb
basquiat-1.3.6 spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb
basquiat-1.3.5 spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb
basquiat-1.3.4 spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb