Skip to content

Commit

Permalink
Merge pull request #3 from timgriffiths/master
Browse files Browse the repository at this point in the history
Fixing Unit tests to remove json check that is no longer valid
  • Loading branch information
contentfree committed Dec 21, 2015
2 parents 63a23dd + fc3549d commit cdd17b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/outputs/influxdb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

before do
subject.register
allow(subject).to receive(:post).with(json_result)
allow(subject).to receive(:post).with(result)

2.times do
subject.receive(LogStash::Event.new("foo" => "1", "bar" => "2", "time" => "3", "type" => "generator"))
Expand All @@ -36,10 +36,10 @@
subject.close
end

let(:json_result) { "[{\"name\":\"logstash\",\"columns\":[\"foo\",\"bar\",\"time\"],\"points\":[[\"1\",\"2\",\"3\"],[\"1\",\"2\",\"3\"]]}]" }
let(:result) { "logstash foo=\"1\",bar=\"2\" 3\nlogstash foo=\"1\",bar=\"2\" 3" }

it "should receive 2 events, flush and call post with 2 items json array" do
expect(subject).to have_received(:post).with(json_result)
expect(subject).to have_received(:post).with(result)
end

end
Expand Down

0 comments on commit cdd17b5

Please sign in to comment.