spree/spree — pull request #3859 by laspluviosillas (2013-10-11 00:38:56+00:00)
Title: Allow coupon codes to be added from admin adjustments index.

Uses API to allow coupon code submission.

To use:
- Create a new order, go to the adjustments page, and try adding a coupon code.
- Should properly show validation errors.
- If you hit add without a value, button will simply ignore the request.

#### Concern 1:

The 3 tests I added take a whopping 15 seconds on my machine ... I know capybara tests are slow but I'm not sure how I get around *not* using capybara given that this functionality requires AJAX.

#### Second [minor] concern:
https://github.com/laspluviosillas/spree/compare/add_adjustments_from_admin?expand=1#diff-61724faa21c94b40f3ab9d29a665dc67R69

By making that method available at the class level, I can use it in the adjustments index view to hide the coupon code component if the order cannot receive coupons, yet it still feels a bit dirty. Suggestions welcome.