* Add Api::ApplicationController * Route OPTION requests (CORS preflight) to API application controller * Filter all API requests through #cor_filter in API application controller
12 lines
284 B
Ruby
12 lines
284 B
Ruby
require 'spec_helper'
|
|
|
|
describe '/api OPTIONS requests routing' do
|
|
it 'routes to Api::ApplicationController#cor_preflight' do
|
|
{ :options => '/api/v0' }.should route_to(
|
|
:controller => 'api/application',
|
|
:action => 'cor_preflight',
|
|
:all => 'v0'
|
|
)
|
|
end
|
|
end
|