From 7237fb04a8d5b9187ed44f1e8f6cc034c2074153 Mon Sep 17 00:00:00 2001 From: manmorjim Date: Fri, 10 Apr 2020 14:33:38 +0200 Subject: [PATCH] Adding test for column date type in numeric histograms --- test/acceptance/dataviews/histogram-test.js | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/acceptance/dataviews/histogram-test.js b/test/acceptance/dataviews/histogram-test.js index a78c0de7..ac59a848 100644 --- a/test/acceptance/dataviews/histogram-test.js +++ b/test/acceptance/dataviews/histogram-test.js @@ -325,6 +325,15 @@ describe('histogram-dataview for date column type', function () { column: 'd', aggregation: 'minute' } + }, + date_histogram_no_agg: { + options: { + column: 'd' + }, + source: { + id: 'minute-histogram-source-tz' + }, + type: 'histogram' } }, [ @@ -1232,6 +1241,21 @@ describe('histogram-dataview for date column type', function () { done(); }); }); + + it('should work with dates without aggregation', function (done) { + var params = { + start: 1171583400, + end: 1171584600 + }; + this.testClient = new TestClient(mapConfig, 1234); + this.testClient.getDataview('date_histogram_no_agg', params, function (err, dataview) { + assert.ifError(err); + assert.strictEqual(dataview.type, 'histogram'); + assert.strictEqual(dataview.bins.length, 6); + assert.strictEqual(dataview.bins_count, 6); + done(); + }); + }); }); describe('histogram-dataview: special float valuer', function () {