Sha256: 452c9cfbae2953445b6763aa1addfa098f1e0fa8eb44f06c9d92360a74c273d6

Contents?: true

Size: 582 Bytes

Versions: 15

Compression:

Stored size: 582 Bytes

Contents

describe Pheme::MessageType::AwsEvent do
  let(:poller) { ExampleAwsEventQueuePoller.new }
  let(:message_id) { SecureRandom.uuid }
  let(:queue_url) { 'http://queue_url' }
  let(:queue_message) do
    OpenStruct.new(
      message_id: message_id,
      body: { 'Records' => records }.to_json,
      queue_url: queue_url,
    )
  end

  describe "#parse_body" do
    subject { poller.parse_body(queue_message) }

    context "with JSON message" do
      let!(:records) { [{ 'eventVersion' => '2.0' }] }
      its('first.eventVersion') { is_expected.to eq('2.0') }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pheme-3.1.3 spec/message_type/aws_event_spec.rb
pheme-3.1.2 spec/message_type/aws_event_spec.rb
pheme-3.1.1 spec/message_type/aws_event_spec.rb
pheme-3.1.0 spec/message_type/aws_event_spec.rb
pheme-3.0.1 spec/message_type/aws_event_spec.rb
pheme-3.0.0 spec/message_type/aws_event_spec.rb
pheme-1.2.2 spec/message_type/aws_event_spec.rb
pheme-1.2.1 spec/message_type/aws_event_spec.rb
pheme-1.2.0 spec/message_type/aws_event_spec.rb
pheme-1.1.1 spec/message_type/aws_event_spec.rb
pheme-1.1.0 spec/message_type/aws_event_spec.rb
pheme-1.0.0 spec/message_type/aws_event_spec.rb
pheme-0.0.11 spec/message_type/aws_event_spec.rb
pheme-0.0.10 spec/message_type/aws_event_spec.rb
pheme-0.0.9 spec/message_type/aws_event_spec.rb