mirror of
https://github.com/meineerde/rackstash.git
synced 2025-10-17 14:01:01 +00:00
Test JSON encoder behavior with a missing timestamp
This commit is contained in:
parent
952ecd5c73
commit
1d16d366a0
@ -40,5 +40,13 @@ describe Rackstash::Encoder::JSON do
|
||||
expect(encoder.encode(event))
|
||||
.to eql '{"message":"line1\nline2\n","@timestamp":"2016-10-17T10:37:00.000000Z"}'
|
||||
end
|
||||
|
||||
it 'omits a missing timestamp' do
|
||||
event = { 'foo' => 'bar' }
|
||||
|
||||
expect(encoder.encode(event))
|
||||
.to eql '{"foo":"bar"}'
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user