Sha256: a61e3d8c403c40b3236c5bb9f034c4844bb9941e6bb5eff75df90489cc9439bf
Contents?: true
Size: 1.55 KB
Versions: 7
Compression:
Stored size: 1.55 KB
Contents
# frozen_string_literal: true require "spec_helper" describe OmniAuth::Strategies::TempoId do let(:access_token) { instance_double("AccessToken", :options => {}, :[] => "user") } let(:custom_client) do OmniAuth::Strategies::TempoId.new(:test_app, issuer: "https://example-host.com/", discovery: false, client_options: { host: "example-host.com", }) end subject do OmniAuth::Strategies::TempoId.new({}) end before(:each) do allow(subject).to receive(:access_token).and_return(access_token) end context "options" do it "should have correct name" do expect(subject.options.name).to eq "tempo_id" end it "should have correct host" do expect(subject.options.client_options.host).to eq "id.streamfinancial.io" end it "should have correct issuer" do expect(subject.options.issuer).to eq "https://id.streamfinancial.io/" end it "should have the correct discovery setting" do expect(subject.options.discovery).to eq true end describe "should be overrideable" do it "for host" do expect(custom_client.options.client_options.host).to eq "example-host.com" end it "for issuer" do expect(custom_client.options.issuer).to eq "https://example-host.com/" end it "for discovery" do expect(custom_client.options.discovery).to eq false end end end end
Version data entries
7 entries across 7 versions & 1 rubygems