Sha256: f277707a3d0d3d80f36e8fcc6c383b874d1c32ea8850ba760f71c1a54efc03bb

Contents?: true

Size: 1.24 KB

Versions: 35

Compression:

Stored size: 1.24 KB

Contents

describe MangoPay::Ubo do
  include_context 'users'
  include_context 'ubo'

  describe 'FETCH' do
    it 'can fetch a Ubo' do
      legal_user = new_legal_user
      ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'])
      ubo = new_ubo(legal_user, ubo_declaration)
      result = MangoPay::Ubo.fetch(legal_user['Id'], ubo_declaration['Id'], ubo['Id'])
      expect(result).not_to be_nil
      expect(result['Id']).equal? ubo['Id']
    end
  end

  describe 'CREATE' do
    it 'can create a new Ubo' do
      legal_user = new_legal_user
      ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'])
      result = new_ubo(legal_user, ubo_declaration)
      expect(result).not_to be_nil
    end
  end

  describe 'UPDATE' do
    it 'can update a Ubo' do
      legal_user = new_legal_user
      ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'])
      ubo = new_ubo(legal_user, ubo_declaration)
      ubo['FirstName'] = 'Santa'
      ubo['LastName'] = 'Clause'

      result = MangoPay::Ubo.update(legal_user['Id'], ubo_declaration['Id'], ubo['Id'], ubo)
      expect(result).not_to be_nil
      expect(result['FirstName']).equal? ubo['FirstName']
      expect(result['LastName']).equal? ubo['LastName']
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
mangopay-3.28.0 spec/mangopay/ubo_spec.rb
mangopay-3.27.0 spec/mangopay/ubo_spec.rb
mangopay-3.26.1 spec/mangopay/ubo_spec.rb
mangopay-3.26.0 spec/mangopay/ubo_spec.rb
mangopay-3.25.1 spec/mangopay/ubo_spec.rb
mangopay-3.25.0 spec/mangopay/ubo_spec.rb
mangopay-3.24.1 spec/mangopay/ubo_spec.rb
mangopay-3.24.0 spec/mangopay/ubo_spec.rb
mangopay-3.23.0 spec/mangopay/ubo_spec.rb
mangopay-3.22.0 spec/mangopay/ubo_spec.rb
mangopay-3.21.0 spec/mangopay/ubo_spec.rb
mangopay-3.20.0 spec/mangopay/ubo_spec.rb
mangopay-3.19.0 spec/mangopay/ubo_spec.rb
mangopay-3.18.0 spec/mangopay/ubo_spec.rb
mangopay-3.17.0 spec/mangopay/ubo_spec.rb
mangopay-3.16.0 spec/mangopay/ubo_spec.rb
mangopay-3.15.0 spec/mangopay/ubo_spec.rb
mangopay-3.14.0 spec/mangopay/ubo_spec.rb
mangopay-3.13.2 spec/mangopay/ubo_spec.rb
mangopay-3.12.0 spec/mangopay/ubo_spec.rb