Learn from live example how to test a $resource factory. What to test? What /not/ to test? When to use $resource? These questions will be answered here.
Let's start with a brief review.
The $resource is an Angular Service that makes it really easy to setup CRUD operations with RESTful APIs. If you have a /api/posts/ , this is all the code you need to setup http operations for POST, PUT, DELETE and GET: