test/embulk/input/test_mixpanel.rb in embulk-input-mixpanel-0.4.3 vs test/embulk/input/test_mixpanel.rb in embulk-input-mixpanel-0.4.4

- old
+ new

@@ -508,21 +508,21 @@ end end class RunTest < self def setup_client - any_instance_of(MixpanelApi::Client) do |klass| - stub(klass).request { records_raw_response } + stub(klass).request_small_dataset { records_raw_response } + stub(klass).request { records } end end def setup super - @page_builder = Object.new @plugin = Mixpanel.new(task, nil, nil, @page_builder) + stub(@plugin).fetch { records } end def test_preview stub(@plugin).preview? { true } mock(@page_builder).add(anything).times(records.length) @@ -540,11 +540,11 @@ end def test_timezone stub(@plugin).preview? { false } adjusted = record_epoch - timezone_offset_seconds - mock(@page_builder).add(["FOO", adjusted]).times(records.length * 2) + mock(@page_builder).add(["FOO", adjusted, "event"]).times(records.length * 2) mock(@page_builder).finish @plugin.run end @@ -598,16 +598,17 @@ end end class UnknownColumnsTest < self def setup - super @page_builder = Object.new @plugin = Mixpanel.new(task, nil, nil, @page_builder) + stub(@plugin).fetch { records } end def test_run - Embulk.logger.warn(anything) + stub(Embulk.logger).warn + stub(Embulk.logger).info stub(@plugin).preview? { false } # NOTE: Expect records are contained same record record = records.first properties = record["properties"]