Ok, problem solved!!! I've used angular.uppercase($rootScope.appName), instead of using the native API.
On Tuesday, February 11, 2014 1:05:16 PM UTC-5, chandra sekhar veera wrote: > > The $rootScope.appName is set inside the run block, which could be the > reason the test case is failing, but I'm not sue. > > Here's the error trace, > > PhantomJS 1.9 (Mac) LOG: 'Login controller!' > PhantomJS 1.9 (Mac) Login controller tests: LoginCtrl has been > instantiated FAILED > TypeError: 'undefined' is not an object (evaluating > '$rootScope.appName.toUpperCase') > at > /Users/cveera/Sites/CN-Identity-client/src/app/common/services/services.js:123 > at /Users/cveera/Sites/CN-Identity-client/src/app/login/login.js:122 > at invoke > (/Users/cveera/Sites/CN-Identity-client/src/libs/angular.js:2880) > at instantiate > (/Users/cveera/Sites/CN-Identity-client/src/libs/angular.js:2890) > at /Users/cveera/Sites/CN-Identity-client/src/libs/angular.js:5178 > at > /Users/cveera/Sites/CN-Identity-client/test/unit/login/loginSpec.js:64 > at invoke > (/Users/cveera/Sites/CN-Identity-client/src/libs/angular.js:2880) > at workFn > (/Users/cveera/Sites/CN-Identity-client/src/libs/angular-mocks.js:1836) > Expected undefined to be truthy. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
