Sha256: 4bdb008bfb53fdbb33b566d44ee9743796c84263c26767b36bbdb2a4cb9ed365

Contents?: true

Size: 479 Bytes

Versions: 22

Compression:

Stored size: 479 Bytes

Contents

require 'spec_helper'
require 'helpers/certmeister_signing_request_helper'

require 'certmeister/policy/blackhole'

describe Certmeister::Policy::Blackhole do

  it "demands a request" do
    expect { subject.authenticate }.to raise_error(ArgumentError)
  end

  it "refuses any request" do
    response = subject.authenticate(CertmeisterSigningRequestHelper::valid_request)
    expect(response).to_not be_authenticated
    expect(response.error).to eql "blackholed"
  end

end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
certmeister-0.0.2 spec/certmeister/policy/blackhole_spec.rb
certmeister-0.0.1 spec/certmeister/policy/blackhole_spec.rb