Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stormpython committed Jun 4, 2015
1 parent be1ca75 commit c451224
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/unit/specs/vislib/visualizations/column_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ define(function (require) {
'stacked'
];

var min;
var max;

angular.module('ColumnChartFactory', ['kibana']);

dataArray.forEach(function (data, i) {
Expand All @@ -59,6 +62,9 @@ define(function (require) {

vis.on('brush', _.noop);
vis.render(data);

min = vis.handler.data.getYMin();
max = vis.handler.data.getYMax();
});
});

Expand Down Expand Up @@ -206,10 +212,9 @@ define(function (require) {
it('should return yAxis extents equal to data extents', function () {
vis.handler.charts.forEach(function (chart) {
var yAxis = chart.handler.yAxis;
var yVals = [vis.handler.data.getYMin(), vis.handler.data.getYMax()];

expect(yAxis.domain[0]).to.equal(yVals[0]);
expect(yAxis.domain[1]).to.equal(yVals[1]);
expect(yAxis.domain[0]).to.equal(min);
expect(yAxis.domain[1]).to.equal(max);
});
});
});
Expand Down

0 comments on commit c451224

Please sign in to comment.