Skip to content

Instantly share code, notes, and snippets.

@HoyaBoya
Last active January 1, 2016 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HoyaBoya/8184734 to your computer and use it in GitHub Desktop.
Save HoyaBoya/8184734 to your computer and use it in GitHub Desktop.
Spree Commerce Route Test
require 'spec_helper'
describe Spree::Api::OrdersController do
routes { Spree::Core::Engine.routes }
describe "PUT /api/orders/:id/apply_coupon" do
it "should route" do
expect(:put => "/api/orders/123/apply_coupon_code?coupon_code=X").to route_to(
controller: 'spree/api/orders',
action: 'apply_coupon_code',
id: '123',
coupon_code: 'X',
format: 'json'
)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment