2013-06-14 02:37:13 +00:00
|
|
|
describe('DocsApp', function() {
|
|
|
|
|
|
2013-08-21 00:19:29 +00:00
|
|
|
// Do not run this suite on Internet Explorer.
|
|
|
|
|
if (msie < 10) return;
|
|
|
|
|
|
2013-06-14 02:37:13 +00:00
|
|
|
beforeEach(module('docsApp'));
|
|
|
|
|
|
|
|
|
|
describe('DocsVersionsCtrl', function() {
|
|
|
|
|
var $scope, ctrl, window, version = '9.8.7';
|
|
|
|
|
|
|
|
|
|
beforeEach(function() {
|
|
|
|
|
module(function($provide) {
|
2013-08-14 06:58:53 +00:00
|
|
|
$provide.value('$window', window = createMockWindow());
|
2013-06-14 02:37:13 +00:00
|
|
|
});
|
|
|
|
|
inject(function($controller, $rootScope) {
|
|
|
|
|
$scope = $rootScope.$new();
|
|
|
|
|
$scope.version = version;
|
|
|
|
|
ctrl = $controller('DocsVersionsCtrl',{
|
|
|
|
|
$scope : $scope,
|
|
|
|
|
$window : window
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe('changing the URL', function() {
|
2013-08-15 05:09:06 +00:00
|
|
|
it('should jump to the url provided', function() {
|
|
|
|
|
$scope.jumpToDocsVersion({ version: '1.0.1', url : 'page123'});
|
|
|
|
|
expect(window.location).toBe('page123');
|
2013-06-14 02:37:13 +00:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|