Skip to content

Commit

Permalink
test: add tests for CRL urls redirecting to other url
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagorodriguez96 committed Mar 1, 2024
1 parent c12c860 commit 9db87eb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,20 @@
expect { subject }.to raise_error(described_class::UnverifiedSigningKeyError, error)
end
end

context "when a CRL url redirects to another url" do
let(:redirecting_url) do
{ status: 302, headers: { location: "http://crl.globalsign.com/gs/redirected.crl" } }
end

before(:each) do
stub_request(:get, "http://crl.globalsign.com/gs/gsextendvalsha2g3r3.crl").to_return(redirecting_url)
stub_request(:get, "http://crl.globalsign.com/gs/redirected.crl").to_return(extendval_crl)
end

specify do
expect(subject).to include("nextUpdate", "entries", "no")
end
end
end
end

0 comments on commit 9db87eb

Please sign in to comment.