使用 Cucumber 测试 Authlogic Remember Me

发布于 2024-09-12 23:09:09 字数 105 浏览 2 评论 0原文

有没有人尝试过用 Cucumber 测试 Authlogic“记住我”功能?我不知道如何让 webrat “关闭浏览器”来测试持久性。

唯一的想法是也许它需要硒?有没有办法不用呢?

Has anyone tried to test the Authlogic "Remember Me" functionality with Cucumber? I am not sure how to get webrat to "close a browser" to test persistence.

Only thought is maybe it requires selenium? Is there a way to do without?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜访吸血鬼 2024-09-19 23:09:09

Webrat 与 Rails 应用程序的通信比浏览器更直接(就像 Selenium 那样)。我会制作一个自定义匹配器,例如:
(然后)我应该被应用程序记住

然后我会检查数据库或会话,取决于authlogic如何处理此功能。

Webrat communicates with Rails app more directly than a browser(like Selenium does). I would make a custom matcher like:
(Then) I should be remembered by the application

And then I would check the db or the session, depends how the authlogic handles this feature.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文