Sha256: c4e23fb70302f5ccba96d9b47ebb015200748f1bf8f37182029399862cf52863
Contents?: true
Size: 994 Bytes
Versions: 14
Compression:
Stored size: 994 Bytes
Contents
# encoding: utf-8 require_relative "../spec_helper" describe LogStash::Outputs::Mongodb, :integration => true do let(:uri) { 'mongodb://localhost:27017' } let(:database) { 'logstash' } let(:collection) { 'logs' } let(:uuid) { SecureRandom.uuid } let(:config) do { "uri" => uri, "database" => database, "collection" => collection, "isodate" => true } end describe "#send" do subject { LogStash::Outputs::Mongodb.new(config) } let(:properties) { { "message" => "This is a message!", "uuid" => uuid, "number" => BigDecimal.new("4321.1234"), "utf8" => "żółć", "int" => 42, "arry" => [42, "string", 4321.1234]} } let(:event) { LogStash::Event.new(properties) } before(:each) do subject.register end it "should send the event to the database" do subject.receive(event) expect(subject).to have_received(event) end end end
Version data entries
14 entries across 14 versions & 3 rubygems