*
* @description
* Get cars from API REST.
+ *
+ * @returns {Promise} Promise that will be resolved or rejected when $http responds.
*/
function getAll() {
return $http.get(API.CARS)
*
* @description
* Get one car by its id from API REST.
+ *
+ * @returns {Promise} Promise that will be resolved or rejected when $http responds.
*/
function getById(id) {
expectedValue = $http.get(API.CAR.replace(':carId', id));
return expectedValue;
}
+ /**
+ * @ngdoc method
+ * @name getExpectedValue
+ * @methodOf app.cars.cars
+ *
+ * @description
+ * Returns expected value as promise.
+ *
+ * @returns {Promise} Promise that will be resolved or rejected when $http responds.
+ */
function getExpectedValue() {
return expectedValue;
}