Cucumber / Capybara returns "Not Found" page after redirect

first, sorry for the bad english.

I have a test that represents a login form. after redirecting, when I check the message "successfully registered ..." then my page.body

'<h1>Not Found</h1>'

but this works fine in a manual browser test.

what should i do wrong?

+3
source share
2 answers

It seems like one of your steps is being redirected in a way that you are not expecting.

  • Check the filters in front of the controller and application controller to determine if the I18n I / O filter will redirect your page.

  • -, :

    And show me the page
    

    , capybara, .

!

+2

. , , rake db:test:prepare, , , . (I.e. Given there is a user named "Joe"...)

-2

Source: https://habr.com/ru/post/1775720/


All Articles