Sha256: 5a089aed2c173c8d09671b540bf551129922bcfae6819bbd51d59b17c2ac5bd0

Contents?: true

Size: 588 Bytes

Versions: 167

Compression:

Stored size: 588 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,
                                                    @context_entries)
    results.find do |result|
      result.eval_decision == 'allowed'
    end
  end

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

  chain :context_entries do |context|
    @context_entries = context
  end
end

Version data entries

167 entries across 167 versions & 4 rubygems

Version Path
cthiesfork-awspec-1.2.2 lib/awspec/matcher/be_allowed_action.rb
cthiesfork-awspec-1.2.1 lib/awspec/matcher/be_allowed_action.rb
awspec-1.18.5 lib/awspec/matcher/be_allowed_action.rb
cthiesfork-awspec-1.2.0 lib/awspec/matcher/be_allowed_action.rb
cthiesfork-awspec-1.1.0 lib/awspec/matcher/be_allowed_action.rb
cthiesfork-awspec-1.0.0 lib/awspec/matcher/be_allowed_action.rb
awspec-1.18.4 lib/awspec/matcher/be_allowed_action.rb
awspec-1.18.3 lib/awspec/matcher/be_allowed_action.rb
awspec-1.18.2 lib/awspec/matcher/be_allowed_action.rb
awspec-1.18.1 lib/awspec/matcher/be_allowed_action.rb
awspec-1.18.0 lib/awspec/matcher/be_allowed_action.rb
awspec-1.17.4 lib/awspec/matcher/be_allowed_action.rb
awspec-1.17.3 lib/awspec/matcher/be_allowed_action.rb
awspec-1.17.2 lib/awspec/matcher/be_allowed_action.rb
awspec-1.17.1 lib/awspec/matcher/be_allowed_action.rb
awspec-1.17.0 lib/awspec/matcher/be_allowed_action.rb
awspec-1.16.1 lib/awspec/matcher/be_allowed_action.rb
awspec-1.16.0 lib/awspec/matcher/be_allowed_action.rb
awspec-1.15.3 lib/awspec/matcher/be_allowed_action.rb
awspec-1.15.2 lib/awspec/matcher/be_allowed_action.rb