Sha256: f3fc4044e558e90541a05df4cd7df71e8964b89f8c78b3cf5565e6cff9fa20a0

Contents?: true

Size: 867 Bytes

Versions: 1

Compression:

Stored size: 867 Bytes

Contents

require "spec_helper"

describe Qsagi::Message do
  describe "delivery_tag" do
    it "returns the delivery_tag" do
      data = {
        :delivery_details => {:delivery_tag => "tag"},
        :payload => "raw_payload"
      }
      Qsagi::Message.new(data, :parsed_payload).delivery_tag.should == "tag"
    end
  end

  describe "exchange" do
    it "returns the exchange" do
      data = {
        :delivery_details => {:exchange => "the_exchange"},
        :payload => "raw_payload"
      }
      Qsagi::Message.new(data, :parsed_payload).exchange.should == "the_exchange"
    end
  end

  describe "payload" do
    it "returns the parsed payload" do
      data = {
        :delivery_details => {:delivery_tag => "tag"},
        :payload => "raw_payload"
      }
      Qsagi::Message.new(data, :parsed_payload).payload.should == :parsed_payload
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qsagi-0.0.1 spec/qsagi/message_spec.rb