Sha256: a7d4137d82ab2302034f440225c3e8bac50483a2a4c4567498f8c2d02c0bd834

Contents?: true

Size: 496 Bytes

Versions: 1

Compression:

Stored size: 496 Bytes

Contents

# encoding: utf-8
require "logstash/devutils/rspec/spec_helper"
require "logstash/outputs/mqtt2"
require "logstash/codecs/plain"
require "logstash/event"

describe LogStash::Outputs::Mqtt2 do
  let(:sample_event) { LogStash::Event.new }
  let(:output) { LogStash::Outputs::Mqtt2.new }

  before do
    output.register
  end

  describe "receive message" do
    subject { output.receive(sample_event) }

    it "returns a string" do
      expect(subject).to eq("Event received")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logstash-output-mqtt2-1.0.0 spec/outputs/mqtt2_spec.rb