Sha256: 7a480c4c395c9afb6817b5c715bb4ddf943a997db2dc9dbb831f4f6c30bbc564

Contents?: true

Size: 552 Bytes

Versions: 1

Compression:

Stored size: 552 Bytes

Contents

When(/I have a (\w+) resource defined as/) do |model_name, resource_definition|
  @resource_model = find_model(model_name)

  eval_dsl resource_definition, @resource_model
end

When(/I have a confidential one named "([\w\s]+)"/) do |name|
  @resource = @resource_model.new(name: name)
end

Then(/I should be able to set an ACL on it/) do
  instance = @resource_model.new

  instance.acl = {foo: :bar}
  instance.save!
  instance = @resource_model.find(instance.id)

  instance.acl == {foo: :bar} && instance.acl.class.kind_of?(@resource_model.acl)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eaco-0.6.0 features/step_definitions/resource_authorization.rb