mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
add test for
This commit is contained in:
parent
fa394f6d70
commit
6f8d258ccc
1 changed files with 12 additions and 5 deletions
|
@ -3,13 +3,13 @@ define(function (require) {
|
|||
require('components/state_management/app_state');
|
||||
|
||||
describe('State Management', function () {
|
||||
var $rootScope, $location, AppState;
|
||||
var $rootScope, AppState;
|
||||
|
||||
beforeEach(function () {
|
||||
module('kibana');
|
||||
|
||||
inject(function (_$location_, Private) {
|
||||
$location = _$location_;
|
||||
inject(function (_$rootScope_, _$location_, Private) {
|
||||
$rootScope = _$rootScope_;
|
||||
AppState = Private(require('components/state_management/app_state'));
|
||||
});
|
||||
});
|
||||
|
@ -25,9 +25,16 @@ define(function (require) {
|
|||
expect(appState).to.have.property('destroy');
|
||||
});
|
||||
|
||||
it('should use passed in params');
|
||||
it('should be destroyed on $routeChangeStart', function () {
|
||||
var destroySpy = sinon.spy(appState, 'destroy');
|
||||
var url = '/test/path';
|
||||
|
||||
it('should be destroyed on route change');
|
||||
$rootScope.$emit('$routeChangeStart');
|
||||
|
||||
expect(destroySpy.callCount).to.be(1);
|
||||
});
|
||||
|
||||
it('should use passed in params');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue