Answer the question
In order to leave comments, you need to log in
How to write routes spec correctly?
Hello.
in routes.rb I have this:
authorized = ->(request) { request.session[:user_id].present? }
constraints authorized do
get 'test' => 'test#test'
end
expect(get: '/test').to route_to('test#test')
post 'login'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question