Skip to content

Instantly share code, notes, and snippets.

@HoyaBoya
Created December 27, 2013 16: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/8149374 to your computer and use it in GitHub Desktop.
Save HoyaBoya/8149374 to your computer and use it in GitHub Desktop.
Working route test for Spree API....
require 'spec_helper'
describe Spree::Api::OrdersController do
# This is required for Rspec route_to to work!
routes { Spree::Core::Engine.routes }
describe "GET /api/orders/mine" do
it "should route" do
expect(:get => "/api/orders/mine").to route_to(
controller: 'spree/api/orders',
action: 'mine',
format: 'json'
)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment