David Kahn
unread,Dec 16, 2010, 4:17:09 PM12/16/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ste...@googlegroups.com
I have this spec using Steak where I am testing that if a user has a session (logged in), if they go to the login page they are redirected to the home page. When I try this in the browser things work fine.
But here it fails on the last step --- instead of the expected result (the home page), the login page is loading, meaning that somehow it seems I lost the user session. Am I missing something? When I call Visit is it creating a new Capybara session?
scenario "be albe to log in and log out" do
# login with good user
logged_in_as_role_for_practice(:practice_user, "My Practice")
confirm_home_page_loaded
# try to go to login and should redirect to home
visit('login')
confirm_home_page_loaded # THIS IS FAILING HERE - the login page is loading!!!
end
Thanks,
David