Sha256: 86f56ae56d9d4c4cf86c93be6f41d41c8ac2c174722a23cdfd5d51e216b604a7

Contents?: true

Size: 338 Bytes

Versions: 24

Compression:

Stored size: 338 Bytes

Contents

RSpec::Matchers.define :be_allowed_action do |action_name|
  match do |type|
    results = type.select_policy_evaluation_results(type.resource_via_client[:arn], action_name, @resource_arn)
    results.find do |result|
      result.eval_decision == 'allowed'
    end
  end

  chain :resource_arn do |arn|
    @resource_arn = arn
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
awspec-0.37.6 lib/awspec/matcher/be_allowed_action.rb
awspec-0.37.5 lib/awspec/matcher/be_allowed_action.rb
awspec-0.37.4 lib/awspec/matcher/be_allowed_action.rb
awspec-0.37.3 lib/awspec/matcher/be_allowed_action.rb
awspec-0.37.2 lib/awspec/matcher/be_allowed_action.rb
awspec-0.37.1 lib/awspec/matcher/be_allowed_action.rb
awspec-0.37.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.36.1 lib/awspec/matcher/be_allowed_action.rb
awspec-0.36.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.35.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.34.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.33.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.32.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.31.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.30.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.29.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.28.1 lib/awspec/matcher/be_allowed_action.rb
awspec-0.28.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.27.2 lib/awspec/matcher/be_allowed_action.rb
awspec-0.27.1 lib/awspec/matcher/be_allowed_action.rb