Sha256: 5d79896bc1bb7b86eaa194be3489382b2303c66354e57a3ab58a48790440f784
Contents?: true
Size: 1.15 KB
Versions: 6
Compression:
Stored size: 1.15 KB
Contents
# frozen_string_literal: true require "spec_helper" RSpec.describe PortalConnectors::SsoClient do describe "#disable_admin", vcr: true do it "returns executing status" do data, ok = described_class.singleton.disable_admin("admin@remitano.com") expect(data["email"]).to eq("admin@remitano.com") expect(data["disabled"]).to eq true expect(ok).to eq true end end describe "#enable_admin", vcr: true do it "returns executing status" do data, ok = described_class.singleton.enable_admin("admin@remitano.com") expect(data["email"]).to eq("admin@remitano.com") expect(data["disabled"]).to eq false expect(ok).to eq true end end describe "#verify_otp", vcr: true do it "returns result of otp verification" do token = "fake_token" data, ok = described_class.singleton.verify_otp("admin@example.com", token) expect(data["error"]).to eq("Invalid token") expect(ok).to be_falsy valid_token = "345385" data, ok = described_class.singleton.verify_otp("admin@example.com", valid_token) expect(data["success"]).to be_truthy expect(ok).to be_truthy end end end
Version data entries
6 entries across 6 versions & 1 rubygems