Sha256: bb66af0b1793db77d0c52f3669848cea66ef7d67314b28376833c70106037d11

Contents?: true

Size: 673 Bytes

Versions: 13

Compression:

Stored size: 673 Bytes

Contents

RSpec.describe "RSpec ACL matchers", acl_spec: true do
  let(:example_certificate) { x509_certificate_hash(ou: "ponycopter") }
  let(:another_certificate) { x509_certificate_hash(ou: "derpderp") }

  subject do
    Rails::Auth::ACL.from_yaml(
      fixture_path("example_acl.yml").read,
      matchers: {
        allow_x509_subject: Rails::Auth::X509::Matcher,
        allow_claims:       ClaimsMatcher
      }
    )
  end

  describe "/baz/quux" do
    it { is_expected.to permit get_request(certificates: example_certificate) }
    it { is_expected.not_to permit get_request(certificates: another_certificate) }
    it { is_expected.not_to permit get_request }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rails-auth-1.3.0 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-1.2.0 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-1.1.0 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-1.0.0 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-0.5.3 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-0.5.2 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-0.5.1 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-0.5.0 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-0.4.1 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-0.4.0 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-0.3.0 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-0.2.0 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
rails-auth-0.1.0 spec/rails/auth/rspec/matchers/acl_matchers_spec.rb