Skip to content

Instantly share code, notes, and snippets.

@leemcalilly
Created January 25, 2012 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leemcalilly/1677202 to your computer and use it in GitHub Desktop.
Save leemcalilly/1677202 to your computer and use it in GitHub Desktop.
Password Reset Spec
it "successfully logs out" do
visit root_path
click_link "Log Out"
visit login_path
save_and_open_page
end
@leemcalilly
Copy link
Author

  1. PasswordResets successfully logs out
    Failure/Error: click_link "Log Out"
    Capybara::ElementNotFound:
    no link with title, id or text 'Log Out' found

    (eval):2:in `click_link'

    ./spec/requests/password_resets_spec.rb:12:in`block (2 levels) in <top (required)>'

@jpemberthy
Copy link

replace click_link with click_on - just wondering :P

@leemcalilly
Copy link
Author

Still fails. I think it's because the session is not the problem. I can get to the login page using click_link "Log In", it's just that visit login_path doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment