testing angular ng-resource