Sha256: f4488db94f80d123b7b1a13af7c932eea1fd36070af6b97586c586d5a714a1f5

Contents?: true

Size: 674 Bytes

Versions: 2

Compression:

Stored size: 674 Bytes

Contents

require 'spec_helper'
require_relative '../../../lib/logasm/adapters/rabbitmq_adapter/message_builder'

describe Logasm::Adapters::RabbitmqAdapter::MessageBuilder do
  subject { message_builder.build_message(metadata, level) }

  let(:message_builder) { described_class.new(service_name) }
  let(:service_name) { 'test_service' }
  let(:level) { :info }
  let(:metadata) { {message: 'test'} }

  it 'adds necessary arguments' do
    expect(subject[:message]).to eq(metadata[:message])
    expect(subject[:application]).to eq(service_name)
    expect(subject[:level]).to eq(level)
    expect(subject).to have_key(:host)
    expect(subject).to have_key(:@timestamp)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
logasm-0.2.1 spec/adapters/rabbitmq_adapter/message_builder_spec.rb
logasm-0.2.0 spec/adapters/rabbitmq_adapter/message_builder_spec.rb