spec/certmeister/policy/existing_spec.rb in certmeister-1.0.0 vs spec/certmeister/policy/existing_spec.rb in certmeister-1.0.1
- old
+ new
@@ -15,9 +15,15 @@
it "demands a request" do
expect { subject.authenticate }.to raise_error(ArgumentError)
end
+ it "refuses to authenticate a request with a missing cn" do
+ response = subject.authenticate(cn: nil)
+ expect(response).to_not be_authenticated
+ expect(response.error).to eql "missing cn"
+ end
+
context "when the store contains a cert for axl.hetzner.africa" do
subject { Certmeister::Policy::Existing.new(Certmeister::InMemoryStore.new({"axl.hetzner.africa" => "...cert..."})) }
it "refuses to authenticate a request for axl.hetzner.africa" do