Enter code here...'use strict';
describe('ps.auth/login', function () {
var $rootScope, $state, $injector, state = 'login', myUserName='userName';
beforeEach(module('ps.auth'));
beforeEach(module('ui.router'));
beforeEach(function() {
inject(function(_$rootScope_, _$state_, _$injector_, $templateCache) {
$rootScope = _$rootScope_;
$state = _$state_;
$injector = _$injector_;
// We need add the template entry into the templateCache if we ever
// specify auth/login.html
$templateCache.put('auth/login.html', '');
$state.go('login');
$state.$apply();
});
});
it('should respond to URL', function() {
console.log('********** My State $state = ', $state);
expect($state.href(state, { username: myUserName })).toEqual('/login/userName');
});
});