{"issue":{"created_at":"2011-12-09T23:40:34Z","state":"open","updated_at":"2011-12-09T23:40:34Z","comments":0,"user":{"gravatar_id":"927312947c0c1fac554fd08f9f68c82b","id":50019,"url":"https://api.github.com/users/sgharms","avatar_url":"https://secure.gravatar.com/avatar/927312947c0c1fac554fd08f9f68c82b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"sgharms"},"body":"Given a controller:\r\n\r\n`before_filter :authenticate_user!, :only => :payment`\r\n\r\nGiven an integration test (RSpec+Capybara)\r\n\r\n```ruby\r\n   # Standard as expected\r\n    page.should have_content(\"You need to sign in or sign up before continuing.\")\r\n    page.should have_selector \"#user_username\"\r\n    page.should have_selector \"#user_password\"\r\n    page.should have_selector \"span.button\"\r\n\r\n    click_link \"Sign up\"\r\n    page.should have_content(\"Sign up\")\r\n\r\n    fill_in \"Username\", :with => \"moopy\"\r\n    fill_in \"Email Address\", :with => \"moopy@example.com\"\r\n    fill_in \"Password\", :with => \"password1\"\r\n    fill_in \"Password Confirmation\", :with => \"password1\"\r\n\r\n    click_button \"Sign up\"\r\n    page.should have_content(\"Welcome! You have signed up successfully.\")\r\n```\r\n\r\n\r\nThis is as one would expect.  HOWEVER, hereafter the redirect is to '/'.  When I follow the same path with a browser, after \"Sign up\" I am returned to the page where I would have gone had I been authenticated (The Right Thing™).   \r\n\r\nI'm open to the idea I'm misusing Capybara, but I'd like to remove Devise as a possible culprit.   ","assignee":null,"id":2508581,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"number":1497,"title":"Integration testing with Capybara shows different behavior to browser wrt. authenticate_user! in controller","html_url":"https://github.com/plataformatec/devise/issues/1497","closed_at":null,"url":"https://api.github.com/repos/plataformatec/devise/issues/1497","milestone":null},"action":"opened"}