How to test for a redirect with Rspec and Capybara

后端 未结 5 727
予麋鹿
予麋鹿 2021-01-01 13:11

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:42

    you can do it this way:

    expect(current_path).to eql(new_app_user_registration_path)
    

提交回复
热议问题