2019-05-16 05:32:25 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe ::Gitlab::LetsEncrypt::Challenge do
|
2019-06-06 14:55:31 -04:00
|
|
|
include LetsEncryptHelpers
|
2019-05-16 05:32:25 -04:00
|
|
|
|
2019-06-06 14:55:31 -04:00
|
|
|
let(:challenge) { described_class.new(acme_challenge_double) }
|
2019-05-16 05:32:25 -04:00
|
|
|
|
2019-06-06 14:55:31 -04:00
|
|
|
LetsEncryptHelpers::ACME_CHALLENGE_METHODS.each do |method, value|
|
2019-05-16 05:32:25 -04:00
|
|
|
describe "##{method}" do
|
|
|
|
it 'delegates to Acme::Client::Resources::Challenge' do
|
|
|
|
expect(challenge.public_send(method)).to eq(value)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|