Sha256: 9348ad66c666b093777b82599a21aad36bd91602b54224e09de566fb82022222

Contents?: true

Size: 339 Bytes

Versions: 33

Compression:

Stored size: 339 Bytes

Contents

RSpec::Matchers.define :be_allowed_action do |action_name|
  match do |resource|
    results = resource.select_policy_evaluation_results(resource.resource[: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

33 entries across 33 versions & 1 rubygems

Version Path
awspec-0.25.3 lib/awspec/matcher/be_allowed_action.rb
awspec-0.25.2 lib/awspec/matcher/be_allowed_action.rb
awspec-0.25.1 lib/awspec/matcher/be_allowed_action.rb
awspec-0.25.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.24.2 lib/awspec/matcher/be_allowed_action.rb
awspec-0.24.1 lib/awspec/matcher/be_allowed_action.rb
awspec-0.24.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.23.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.22.1 lib/awspec/matcher/be_allowed_action.rb
awspec-0.22.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.21.6 lib/awspec/matcher/be_allowed_action.rb
awspec-0.21.5 lib/awspec/matcher/be_allowed_action.rb
awspec-0.21.4 lib/awspec/matcher/be_allowed_action.rb
awspec-0.21.3 lib/awspec/matcher/be_allowed_action.rb
awspec-0.21.2 lib/awspec/matcher/be_allowed_action.rb
awspec-0.21.1 lib/awspec/matcher/be_allowed_action.rb
awspec-0.21.0 lib/awspec/matcher/be_allowed_action.rb
awspec-0.20.2 lib/awspec/matcher/be_allowed_action.rb
awspec-0.20.1 lib/awspec/matcher/be_allowed_action.rb
awspec-0.20.0 lib/awspec/matcher/be_allowed_action.rb