Sha256: f40a2dddb32f10f8f476da5fca3fb52a4397b7e86ecd869d75a55f1100a7c028
Contents?: true
Size: 1.38 KB
Versions: 26
Compression:
Stored size: 1.38 KB
Contents
describe MangoPay::UboDeclaration do include_context 'users' include_context 'ubo' describe 'FETCH' do it 'can fetch a UBO declaration' do legal_user = new_legal_user ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id']) ubo_declaration_byId = MangoPay::UboDeclaration.fetch(legal_user['Id'], ubo_declaration['Id']) expect(ubo_declaration).not_to be_nil expect(ubo_declaration_byId).not_to be_nil end it 'fetches ubo declaration just by id' do legal_user = new_legal_user ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'], nil) ubo_declaration_byId = MangoPay::UboDeclaration.fetch(nil, ubo_declaration['Id'], nil) expect(ubo_declaration).not_to be_nil expect(ubo_declaration_byId).not_to be_nil end describe 'UPDATE' do it 'can update a UBO declaration' do legal_user = new_legal_user ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id']) ubo_declaration['Status'] = 'VALIDATION_ASKED' ubo = new_ubo(legal_user, ubo_declaration) ubo_declaration['Ubos'] = [ubo] ubo_declaration = MangoPay::UboDeclaration.update(legal_user['Id'], ubo_declaration['Id'], ubo_declaration) expect(ubo_declaration).not_to be_nil expect(ubo_declaration['Status']).to eq 'VALIDATION_ASKED' end end end end
Version data entries
26 entries across 26 versions & 1 rubygems