2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-06-06 10:47:51 +02:00
|
|
|
describe Universign::API do
|
|
|
|
describe '.request_timestamp', vcr: { cassette_name: 'universign' } do
|
|
|
|
subject { described_class.timestamp(digest) }
|
|
|
|
|
|
|
|
let(:digest) { Digest::SHA256.hexdigest("CECI EST UN HASH") }
|
|
|
|
|
2021-03-08 13:56:13 +01:00
|
|
|
before do
|
|
|
|
stub_const("UNIVERSIGN_API_URL", "https://ws.universign.eu/tsa/post/")
|
|
|
|
end
|
|
|
|
|
2019-06-06 10:47:51 +02:00
|
|
|
it { is_expected.not_to be_nil }
|
|
|
|
end
|
|
|
|
end
|