routes get '/foo/bar' => foo/bar#index {:custom_auth => [:admin]}
I have the route with custom_auth specified in config/routes.rb file.
While invoking index method from controller spec, it complains about route not found which works well without custom_auth parameter removed from routes config.
Is there a way to pass custom_auth while invoking the controller/action from controller spec ?
describe Foo::BarsController do
describe 'GET index' do
get :index
expect(response).to eq {}
end
end
config/routes.rb
get '/foo/bar', :to => 'foo/bar#index', :custom_auth => [:admin]