spree/spree — pull request #2549 by tiagomjorge (2013-02-11 20:36:32+00:00)
Title: API: orders' address specs and addresses fix (#2546)

Hi!

I've written more specs for the OrdersController, to guarantee that we can add a shipping_address and a billing_address, and also to show how to do it. If those specs were there already, I would not have lost half of my day figuring how to do it... ;)

In this process, I've also discovered that the Addresses API were not returning an errors object in case of a faulty address. So I've written a spec to test this and improved the code to return the errors object if needed.

This PR is related to the issue number #2546

Hope you like it!

Regards!
Tiago.