When you use $resource within a service, you don't need to impose mocking $httpBackend on your controller. If you want tests for the $resource, those should be in the unit tests for the service.
The controller should only test things directly under its control, which means testing the service directly.
The examples below show how to mock a $resource service factory, in the simplest way I could come up with.
TODO:
- These are real-world examples and it might be helpfule to visitors if I removed all the extra junk that isn't directly related to testing $resource.
- Should this be updated to be a better example of utilizing promises?