HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/alt/ruby32/share/gems/gems/rest-client-2.1.0/spec/unit/windows/root_certs_spec.rb
require_relative '../_lib'

describe 'RestClient::Windows::RootCerts',
         :if => RestClient::Platform.windows? do
  let(:x509_store) { RestClient::Windows::RootCerts.instance.to_a }

  it 'should return at least one X509 certificate' do
    expect(x509_store.to_a.size).to be >= 1
  end

  it 'should return an X509 certificate with a subject' do
    x509 = x509_store.first

    expect(x509.subject.to_s).to match(/CN=.*/)
  end

  it 'should return X509 certificate objects' do
    x509_store.each do |cert|
      expect(cert).to be_a(OpenSSL::X509::Certificate)
    end
  end
end