Question

I have the following in my features/support/env.rb file:

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

I have this in a feature file:

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

And this in a steps file:

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

All runs fine until I tag the feature @javascript, then I get the error:

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

Can anyone tell me how to respect without_access_control when running in @javascript mode?

I think another way of asking the same question is how do I get Declarative Authorization's built in test-helper without_access_control to work with rack_test, when js=true?

Was it helpful?

Solution

General consensus seems to be this isn't possible but will update if someone proves me wrong!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top