Sha256: 3800e93d410623d8c690522b35fed1a5ee950caefe2f9ba9b68fa12c08be7834
Contents?: true
Size: 674 Bytes
Versions: 7
Compression:
Stored size: 674 Bytes
Contents
require "logstash/devutils/rspec/spec_helper" require "logstash/filters/drop" describe LogStash::Filters::Drop do let(:config) { Hash.new } subject { described_class.new(config) } let(:message) { "hello" } let(:event) { LogStash::Event.new("message" => message) } describe "drop the event" do it "drops the event" do subject.register subject.filter(event) expect(event).to be_cancelled end context "when using percentage" do let(:config) { { "percentage" => 0 }} it "drops the event" do subject.register subject.filter(event) expect(event).not_to be_cancelled end end end end
Version data entries
7 entries across 7 versions & 1 rubygems