diff --git a/test/unit/puppetlabs/services/request_handler/request_handler_core_test.clj b/test/unit/puppetlabs/services/request_handler/request_handler_core_test.clj index 8f189402a..2d3c9ce83 100644 --- a/test/unit/puppetlabs/services/request_handler/request_handler_core_test.clj +++ b/test/unit/puppetlabs/services/request_handler/request_handler_core_test.clj @@ -272,9 +272,11 @@ (:msg %))) (jruby-request-with-client-cert-header "%1Q%2")))) (testing "Bad certificate content" - (is (thrown+? [:kind :bad-request - :msg (str "Unable to parse x-client-cert into " - "certificate: -----END CERTIFICATE not found")] + (is (thrown+? #(and + (= (:kind %) :bad-request) + (re-matches + #"Unable to parse x-client-cert into certificate: -----END CERTIFICATE(-----)? not found" + (:msg %))) (jruby-request-with-client-cert-header "-----BEGIN%20CERTIFICATE-----%0AM")))) (testing "No certificate in content"