Sha256: 86f079cb059bf9e69d499eef421af21d5b941e05758bf13cd4b9e36264920c54
Contents?: true
Size: 1.04 KB
Versions: 6
Compression:
Stored size: 1.04 KB
Contents
require 'spec_helper' RSpec.describe PortalConnectors::IdDetectionClient do let(:client) { PortalConnectors::IdDetectionClient.singleton } describe "#fetch_verification_by_id", :vcr do context "verification is existing" do it "returns verification" do client = described_class.singleton data, ok = client.fetch_verification_by_id("84c01d36-3eae-11ec-ab16-2a3629a5f0e9") expect(ok).to eq true expect(data["image"]).to eq "84c01d36-3eae-11ec-ab16-2a3629a5f0e9/1636167971623.jpg" expect(data["frames"].length).to eq 6 expect(data["frames_bucket"]).to eq "staging4-id-service-framesbucket-tgrpqwhuov6o" expect(data["frames_region"]).to eq "us-east-1" end end context "verification does not exist" do it "returns error" do client = described_class.singleton data, ok = client.fetch_verification_by_id("84c01d36-3eae-11ec-ab16-2a3629a5f0e0") expect(ok).to eq false expect(data["message"]).to eq "Challenge not found" end end end end
Version data entries
6 entries across 6 versions & 1 rubygems