I'm having trouble logging in to my application with a dummy user using
capybara. I'm getting an "infinite redirect" error so I'm wondering if Hobo
is somehow not creating the session after "clicking" the login button in my
test. Here is the error:
Failure/Error: click_button 'Login'
Capybara::InfiniteRedirectError:
redirected more than 5 times, check for infinite redirects.
# (eval):2:in `click_button'
# ./spec/requests/home_page_spec.rb:14:in `block (3 levels) in <top
(required)>
The test.log shows that the redirect is going back and forth between:
Started GET "/login" for 127.0.0.1 at 2012-01-12 10:26:27 -0800
Processing by UsersController#login as HTML
and
Started GET "/" for 127.0.0.1 at 2012-01-12 10:26:27 -0800
Processing by FrontController#index as HTML
and here my test, if it helps:
describe "..." do
it "...etc etc... " do
visit user_login_path
fill_in 'login', :with => @user.email_address
fill_in 'password', :with => "Please"
click_button 'Login'
page.should_not have_content("...")
end
end
Let me know if you need more code/info. This one is really confounding
me... Thanks!
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/hobousers/-/9UHoD6YapYwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.