Example #1
0
        it('should cleanup events with the destroy method', function () {
            sinon.spy(Events, 'off');
            var timeController = new TimeController(canvas);

            timeController.destroy();
            Events.off.should.have.been.called;
            Events.off.restore();
            timeController.destroy();
        });
Example #2
0
 it('should return object when calling destroy method', function () {
     var timeController = new TimeController(canvas);
     timeController.destroy().should.equal(timeController);
 });
Example #3
0
 setTimeout(function () {
     timeController.processMinute.should.have.been.called;
     spy.restore();
     timeController.destroy();
     done();
 }, 300);
Example #4
0
 it('should return an instantiatable', function () {
     var timeController = new TimeController(canvas);
     timeController.should.be.ok;
     timeController.destroy();
 });