Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-30 21:08:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-30 21:08:07 +0300
commit2c72daf2f1744f2b8c8c6674c266907e9ef55558 (patch)
treee489b6e87557d3f6d8a94f2e7d4d47e633d646b5 /spec/lib/gitlab/lets_encrypt
parent4e9acbfba3682c552b3de707c535e6257ef41054 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/lets_encrypt')
-rw-r--r--spec/lib/gitlab/lets_encrypt/order_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/gitlab/lets_encrypt/order_spec.rb b/spec/lib/gitlab/lets_encrypt/order_spec.rb
index 1a759103c44..333fce8e36a 100644
--- a/spec/lib/gitlab/lets_encrypt/order_spec.rb
+++ b/spec/lib/gitlab/lets_encrypt/order_spec.rb
@@ -38,4 +38,23 @@ describe ::Gitlab::LetsEncrypt::Order do
order.request_certificate(domain: 'example.com', private_key: private_key)
end
end
+
+ describe '#challenge_error' do
+ it 'returns error if challenge has errors' do
+ challenge = acme_challenge_double
+
+ # error just to give an example
+ error = {
+ "type" => "urn:ietf:params:acme:error:dns",
+ "detail" => "No valid IP addresses found for test.example.com",
+ "status" => 400
+ }
+
+ allow(challenge).to receive(:error).and_return(error)
+
+ acme_order = acme_order_double(authorizations: [acme_authorization_double(challenge)])
+
+ expect(described_class.new(acme_order).challenge_error).to eq(error)
+ end
+ end
end