Ejemplo n.º 1
0
 it('should call `onDashboardSaved` when the appEvent is received', function() {
   expect($rootScope.onAppEvent.getCall(0).args[1]).to.not.be(ctx.ctrl.onDashboardSaved);
   expect($rootScope.onAppEvent.getCall(0).args[1].toString).to.be(ctx.ctrl.onDashboardSaved.toString);
 });
Ejemplo n.º 2
0
 it('should call get_data', function() {
   expect(ctx.scope.$parent.get_data.called).to.be(true);
 });
Ejemplo n.º 3
0
 it('should delete last segment if no metrics are found', function() {
   expect(ctx.scope.segments[2].value).to.be('select metric');
 });
Ejemplo n.º 4
0
 it('should add segments', function() {
   expect(ctx.scope.segments.length).to.be(3);
 });
Ejemplo n.º 5
0
 it('should have no segments', function() {
   expect(ctx.altSegments.length).to.be(0);
 });
Ejemplo n.º 6
0
 it('should not get pipeline aggs', function() {
   expect(queryDef.getMetricAggTypes(undefined).length).to.be(9);
 });
Ejemplo n.º 7
0
 it('should return zero', function() {
   expect(response.length).to.be(0);
 });
Ejemplo n.º 8
0
 it('should return to the history list view', function() {
   expect(ctx.ctrl.mode).to.be('list');
 });
Ejemplo n.º 9
0
 it('should have an empty delta/changeset', function() {
   expect(ctx.ctrl.delta).to.eql({ basic: '', json: '' });
 });
Ejemplo n.º 10
0
 it('should use the cached diffs instead of fetching', function() {
   expect(historySrv.calculateDiff.calledOnce).to.be(false);
   expect(ctx.ctrl.delta.basic).to.be('cached basic');
 });