[AngularJS] Re: Unit test failing on a Controller when I have $rootScope.appName.toUpperCase() in a Service that's injected into the controller

2014-02-11 Thread chandra sekhar veera
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 i

[AngularJS] Unit test failing on a Controller when I have $rootScope.appName.toUpperCase() in a Service that's injected into the controller

2014-02-11 Thread chandra sekhar veera
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'