Sha256: 373390fceba50e17aacc8e40fd1d4c39965680053e27633edbc407377965b2c9
Contents?: true
Size: 810 Bytes
Versions: 7
Compression:
Stored size: 810 Bytes
Contents
require "spec_helper" require "digicert/cli/certificate_downloader" RSpec.describe Digicert::CLI::CertificateDownloader do describe ".download" do it "downloads the certificate to the specified path" do certificate_id = 123_456_789 allow(File).to receive(:open) mock_digicert_certificate_download_api(certificate_id) Digicert::CLI::CertificateDownloader.download( print_enable: false, path: download_path, certificate_id: certificate_id, ) expect(File).to have_received(:open).thrice end end def download_path File.expand_path("../../tmp", __FILE__).to_s end def mock_digicert_certificate_download_api(certificate_id) stub_digicert_certificate_download_by_format( certificate_id, "pem_all", "pem" ) end end
Version data entries
7 entries across 7 versions & 1 rubygems