Hi Sudheer

If you were to use the real $http connection you would no longer be doing a 
unit test. 

In that case you would be integration testing the app because your result 
would be dependent on the behaviour of the server behind your $http call, 
so for that reason its preferred to use a 100% predictable mock behaviour 
instead of the real connection. 

If you are happy that the unit tests are complete for a given component, 
then instead you would create an integration or end-to-end test to confirm 
that the app works with the real back end.  
  

On Monday, June 16, 2014 11:45:52 AM UTC+1, Sudheer k.v wrote:
>
> i was unable to access rest services using $http while running unit tests 
> with jasmine as test framework and Karma as test runner.
>
> -- Instead of using mock services i am trying to call actual services 
> using $http in unit tests.
> --Is it possible for unit tests to use $http to call actual services 
> instead of mocking the sercvices
>
> Thanks in advance!!!!!!
>

-- 
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/d/optout.

Reply via email to