开发者

RSpec with Capybara - test signing in with OpenID

I am creating request specs following the Railscast at http://railscasts.com/episodes/257-request-specs-and-capybara

In my application, users sign in using their Google OpenID accounts with OmniAuth (http://railscasts.com/episodes/241-simple-o开发者_开发百科mniauth). How can I test this with RSpec and Capybara? When my application redirects to the Google sign in page, I get the following error:

ActionController::RoutingError:
No route matches "/accounts/o8/ud"

It seems that it doesn't allow redirecting away from the application, so how should I test this?


I have no experience with Capybara and can therefore not comment on your question, however, I have saved a bookmark for later usage that may be useful to you: http://blog.zerosum.org/2011/03/19/easy-rails-outh-integration-testing.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜