Sha256: 0a217b1eda5a99a74f45284d6f378583e9d0f978352dba600b9b595f3049e643

Contents?: true

Size: 765 Bytes

Versions: 1

Compression:

Stored size: 765 Bytes

Contents

require 'spec_helper'
require 'basquiat/adapters/rabbitmq_adapter'

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

1 entries across 1 versions & 1 rubygems

Version Path
basquiat-1.3.0.pre.1 spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb