1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-12-19 15:01:12 +00:00

Clarify that the JSON encoder strips all whitespace

This commit is contained in:
Holger Just 2017-06-19 10:27:27 +02:00
parent 32b3ef8e0e
commit e29c8976bb

View File

@ -21,8 +21,8 @@ describe Rackstash::Encoders::JSON do
expect(encoder.encode(event)).to eql '{"message":"text\nwith\nnewlines"}' expect(encoder.encode(event)).to eql '{"message":"text\nwith\nnewlines"}'
end end
it 'rstrips the message' do it 'strips the message from all surpunding whitespace' do
event = { 'message' => "line1\nline2\n \n\t\n" } event = { 'message' => "\n\t \nline1\nline2\n \n\t\n" }
expect(encoder.encode(event)).to eql '{"message":"line1\nline2"}' expect(encoder.encode(event)).to eql '{"message":"line1\nline2"}'
end end
end end