From b9d6c32af7b985468a4af3bdc6ba3c26e3ecc119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Vantomme?= Date: Mon, 8 Mar 2021 13:56:13 +0100 Subject: [PATCH] Test (Universign): mock API URL constant Addressable::URI::InvalidURIError: Absolute URI missing hierarchical segment: 'http://' --- spec/lib/universign/api_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/lib/universign/api_spec.rb b/spec/lib/universign/api_spec.rb index 0d026642c..b87aade6d 100644 --- a/spec/lib/universign/api_spec.rb +++ b/spec/lib/universign/api_spec.rb @@ -4,6 +4,10 @@ describe Universign::API do let(:digest) { Digest::SHA256.hexdigest("CECI EST UN HASH") } + before do + stub_const("UNIVERSIGN_API_URL", "https://ws.universign.eu/tsa/post/") + end + it { is_expected.not_to be_nil } end end