Sha256: b4fb5caf48883be522190cec6ce0fa1fff5ca98bfb6ab24543466613218377e1

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

# rubocop:disable Metrics/BlockLength
RSpec.describe 'Trusona User Accounts' do
  before do
    Trusona.config do |c|
      c.tru_codes_host = ENV['TRUCODES_HOST']
      c.api_host       = ENV['TRUSONA_API_HOST']
      c.secret         = ENV['TRUSONA_SECRET']
      c.token          = ENV['TRUSONA_TOKEN']
    end

    @account_lookup = { trusona_id: '167791378' }
    @email_lookup   = { email: 'claytonhauz@gmail.com' }
  end

  describe 'retrieving a user account with their Trusona ID' do
    context 'when the user account exists and can be found' do
    end

    context 'when no user account exists for the given Trusona ID' do
      it 'then we should see a Trusona::ResourceNotFound error raised' do
        expect { Trusona::UserAccounts.find_by(@account_lookup) }.to(
          raise_error(Trusona::ResourceNotFoundError)
        )
      end
    end
  end

  describe 'searching for a user account using their email' do
    context 'when a user account exists with the given email' do
    end

    context 'when no user accounts exist with the given email' do
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trusona-0.20.0 integrations/user_accounts_spec.rb
trusona-0.19.0 integrations/user_accounts_spec.rb
trusona-0.18.2 integrations/user_accounts_spec.rb
trusona-0.18.1 integrations/user_accounts_spec.rb
trusona-0.16.0 integrations/user_accounts_spec.rb