How to test for a redirect with Rspec and Capybara

后端 未结 5 998
北恋
北恋 2021-01-01 13:27

I don\'t know what I\'m doing wrong, but every time I try to test for a redirect, I get this error: \"@request must be an ActionDispatch::Request\"

context \         


        
5条回答
  •  臣服心动
    2021-01-01 13:44

    you can do it this way:

    expect(current_path).to eql(new_app_user_registration_path)
    

提交回复
热议问题