webogram-i2p/test/unit/controllers/AppImPanelControllerSpec.js
Bart cd3979aeab Cleanup of tests, improved readability of the test code (#1434)
* Cleanup of tests, improved readability

* Improved readability concerning timeout/loading tests, removed unnecessary 'this.'
2017-06-28 18:03:49 +03:00

21 lines
605 B
JavaScript

'use strict'
/* global describe, it, inject, expect, beforeEach, jasmine */
describe('AppImPanelController', function () {
beforeEach(module('myApp.controllers'))
beforeEach(function () {
inject(function (_$controller_, _$rootScope_) {
this.$scope = _$rootScope_.$new()
this.$scope.$on = jasmine.createSpy('$on')
_$controller_('AppImPanelController', { $scope: this.$scope })
})
})
// define tests
it('sets $on(user_update) to no-operation function', function (done) {
expect(this.$scope.$on).toHaveBeenCalledWith('user_update', angular.noop)
done()
})
})