Sha256: f177073bd79dd1424b67f5ef883a5442c5125410be9f7d900fb689d0e38df2c0

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

require "spec_helper"

describe "Any AMQP 0.9.1 client using RabbitMQ" do

  #
  # Environment
  #

  let(:connection) { HotBunnies.connect }
  let(:channel)    { connection.create_channel }

  after :each do
    channel.close
    connection.close
  end


  #
  # Examples
  #

  it "can have use CC and BCC headers for sender selected routing (a RabbitMQ-specific extension to AMQP 0.9.1)" do
    queue1 = channel.queue("", :auto_delete => true)
    queue2 = channel.queue("", :auto_delete => true)
    queue3 = channel.queue("", :auto_delete => true)
    queue4 = channel.queue("", :auto_delete => true)

    channel.default_exchange.publish("1010", :properties => {
                                       :headers => {
                                         "CC"  => [queue2.name],
                                         "BCC" => [queue3.name]
                                       }
                                     }, :routing_key => queue1.name)

    mc1, _ = queue1.status
    mc2, _ = queue2.status
    mc3, _ = queue3.status
    mc4, _ = queue4.status

    mc1.should == 1
    mc2.should == 1
    mc3.should == 1
    mc4.should == 0
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hot_bunnies-1.3.1-java spec/integration/sender_selected_distribution_spec.rb
hot_bunnies-1.2.2-java spec/integration/sender_selected_distribution_spec.rb
hot_bunnies-1.2.1-java spec/integration/sender_selected_distribution_spec.rb
hot_bunnies-1.2.0-java spec/integration/sender_selected_distribution_spec.rb