spec/outputs/http_spec.rb in logstash-output-http-2.1.3 vs spec/outputs/http_spec.rb in logstash-output-http-3.0.0
- old
+ new
@@ -246,20 +246,20 @@
describe "sending the event as a message" do
let(:config) {
{"url" => url, "http_method" => "post", "pool_max" => 1, "format" => "message", "message" => "%{foo} AND %{baz}"}
}
- let(:expected_body) { "#{event["foo"]} AND #{event["baz"]}" }
+ let(:expected_body) { "#{event.get("foo")} AND #{event.get("baz")}" }
let(:expected_content_type) { "text/plain" }
include_examples("a received event")
end
describe "sending a mapped event" do
let(:config) {
{"url" => url, "http_method" => "post", "pool_max" => 1, "mapping" => {"blah" => "X %{foo}"}}
}
- let(:expected_body) { LogStash::Json.dump("blah" => "X #{event["foo"]}") }
+ let(:expected_body) { LogStash::Json.dump("blah" => "X #{event.get("foo")}") }
let(:expected_content_type) { "application/json" }
include_examples("a received event")
end
end