mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 23:53:29 +02:00
Adding tests for controllers.
This commit is contained in:
@@ -1,17 +1,24 @@
|
||||
describe('ShellCtrl', function () {
|
||||
|
||||
beforeEach(angular.mock.module(require('./').name));
|
||||
beforeEach(angular.mock.module(require('./').name))
|
||||
|
||||
var scope, ctrl;
|
||||
var scope, ctrl
|
||||
|
||||
beforeEach(inject(function ($rootScope, $controller) {
|
||||
scope = $rootScope.$new();
|
||||
ctrl = $controller('ShellCtrl', {$scope: scope});
|
||||
}));
|
||||
scope = $rootScope.$new()
|
||||
ctrl = $controller('ShellCtrl', {$scope: scope})
|
||||
}))
|
||||
|
||||
it('should ...', inject(function () {
|
||||
expect(1).toEqual(1);
|
||||
it('should have a reference url', inject(function () {
|
||||
expect(scope.referenceUrl).toEqual('/#!/help/shell')
|
||||
}))
|
||||
|
||||
}));
|
||||
it('should clear the results', inject(function () {
|
||||
scope.result = ['result']
|
||||
scope.run('clear')
|
||||
expect(scope.result).toBe(null)
|
||||
expect(scope.data).toBe('')
|
||||
expect(scope.command).toBe('')
|
||||
}))
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user