spec/outputs/newrelic_spec.rb in logstash-output-newrelic-1.0.4 vs spec/outputs/newrelic_spec.rb in logstash-output-newrelic-1.0.5.pre.beta

- old
+ new

@@ -118,22 +118,20 @@ message['message'] == 'Test message' && message['attributes']['other'] == 'Other value' }) .to have_been_made end - it "JSON object 'message' field is parsed, removed, and its data merged as attributes" do + it "JSON object 'message' field is not parsed" do stub_request(:any, base_uri).to_return(status: 200) message_json = '{ "in-json-1": "1", "in-json-2": "2", "sub-object": {"in-json-3": "3"} }' event = LogStash::Event.new({ :message => message_json, :other => "Other value" }) @newrelic_output.multi_receive([event]) wait_for(a_request(:post, base_uri) .with { |request| message = single_gzipped_message(request.body) - message['attributes']['in-json-1'] == '1' && - message['attributes']['in-json-2'] == '2' && - message['attributes']['sub-object'] == {"in-json-3" => "3"} && + message['message'] == message_json && message['attributes']['other'] == 'Other value' }) .to have_been_made end it "JSON array 'message' field is not parsed, left as is" do