【问题标题】:Using declarative-authorization's "without_access_control"with Cucumber's @javascript将声明性授权的“without_access_control”与 Cucumber 的 @javascript 一起使用
【发布时间】:2012-08-15 18:59:25
【问题描述】:

我的features/support/env.rb 文件中有以下内容:

require 'declarative_authorization/maintenance'
World(Authorization::TestHelper)

我在功能文件中有这个:

When I view the list of users
Then I see the list of users page

这在一个步骤文件中:

When /^I view the list of users$/ do
  without_access_control{ visit users_path }
end

Then /^I see the list of users page$/ do
  current_path.should eq(users_path)
end

在我标记功能 @javascript 之前一切正常,然后我收到错误:

expected: "/users"
got: "/users/sign_in"

谁能告诉我在@javascript模式下运行时如何尊重without_access_control

我认为问同样问题的另一种方式是js=true 时,我如何让声明式授权的内置测试助手without_access_controlrack_test 一起工作?

【问题讨论】:

    标签: javascript cucumber capybara rack declarative-authorization


    【解决方案1】:

    普遍的共识似乎是这是不可能的,但如果有人证明我错了会更新!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-29
      • 2011-02-28
      • 1970-01-01
      • 2014-07-05
      • 2011-02-06
      • 2012-11-07
      • 2013-10-22
      • 1970-01-01
      相关资源
      最近更新 更多