mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
correct the ordering and make gen-docs prepare the list of versions during the build process
30 lines
803 B
JavaScript
30 lines
803 B
JavaScript
describe('DocsApp', function() {
|
|
|
|
beforeEach(module('docsApp'));
|
|
|
|
describe('DocsVersionsCtrl', function() {
|
|
var $scope, ctrl, window, version = '9.8.7';
|
|
|
|
beforeEach(function() {
|
|
module(function($provide) {
|
|
$provide.value('$window', window = createMockWindow());
|
|
});
|
|
inject(function($controller, $rootScope) {
|
|
$scope = $rootScope.$new();
|
|
$scope.version = version;
|
|
ctrl = $controller('DocsVersionsCtrl',{
|
|
$scope : $scope,
|
|
$window : window
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('changing the URL', function() {
|
|
it('should jump to the url provided', function() {
|
|
$scope.jumpToDocsVersion({ version: '1.0.1', url : 'page123'});
|
|
expect(window.location).toBe('page123');
|
|
});
|
|
});
|
|
});
|
|
|
|
});
|