test/embulk/input/zendesk/test_plugin.rb in embulk-input-zendesk-0.1.12 vs test/embulk/input/zendesk/test_plugin.rb in embulk-input-zendesk-0.1.13

- old
+ new

@@ -431,9 +431,26 @@ test "task_report contains next start_time" do report = @plugin.run assert_equal next_start_time, report[:start_time] end + + test "no record" do + first_report = @plugin.run + + @httpclient.test_loopback_http_response << [ + "HTTP/1.1 200", + "Content-Type: application/json", + "", + { + ticket_events: [], + count: 0, + }.to_json + ].join("\r\n") + second_report = @plugin.run + + assert second_report.has_key?(:start_time) + end end sub_test_case "incremental: false" do def run_task task.merge(schema: schema, target: "ticket_events", incremental: false, start_time: start_time)