Sha256: 4bc06faf056a723dbf27a3b15d7dbe5e0e83cf29ffc084de6f4331768df46ad0

Contents?: true

Size: 815 Bytes

Versions: 9

Compression:

Stored size: 815 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Osso::Models::SamlProvider do
  subject { create(:okta_saml_provider) }

  describe '.create' do
    it 'creates an enterprise account' do
      domain = Faker::Internet.domain_name

      provider = described_class.create(
        domain: domain,
        provider: 'Osso::Models::OktaSamlProvider',
      )

      expect(provider.enterprise_account).to be_a(Osso::Models::EnterpriseAccount)
      expect(provider.enterprise_account.domain).to eq(domain)
    end
  end

  describe '#assertion_consumer_service_url' do
    it 'returns the expected URI' do
      ENV['BASE_URL'] = 'https://example.com'

      expect(subject.assertion_consumer_service_url).to eq(
        "https://example.com/auth/saml/#{subject.id}/callback",
      )
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
osso-0.0.3.5 spec/models/saml_provider_spec.rb
osso-0.0.3.4 spec/models/saml_provider_spec.rb
osso-0.0.3.3 spec/models/saml_provider_spec.rb
osso-0.0.3.2 spec/models/saml_provider_spec.rb
osso-0.0.3.1 spec/models/saml_provider_spec.rb
osso-0.0.3 spec/models/saml_provider_spec.rb
osso-0.0.2.10 spec/models/saml_provider_spec.rb
osso-0.0.2.9 spec/models/saml_provider_spec.rb
osso-0.0.2.8 spec/models/saml_provider_spec.rb