Sha256: dd49d8497c4fe926f177600a5405870e60454ceeadfb7d65e83278dd4fde149b
Contents?: true
Size: 962 Bytes
Versions: 8
Compression:
Stored size: 962 Bytes
Contents
require 'spec_helper' describe Xhash::SAT do describe '.get_rfc' do it 'successfully gets rfc by user data' do stub_request(:post, 'https://xhash.dev/api/sat/get-rfc').to_return( body: JSON.dump( { name: 'Bernardo', last_name: 'Suarez', mothers_last_name: 'sepulveda', birth_date: '1994-03-19', rfc: 'SUSB940319BA5' } ), status: 200 ) rfc = Xhash::SAT.get_rfc( name: 'Bernardo', last_name: 'Suarez', mothers_last_name: 'sepulveda', birth_date: '1994-03-19' ) expect(rfc).to be_a(Xhash::RFC) expect(rfc.name).to eq('Bernardo') expect(rfc.last_name).to eq('Suarez') expect(rfc.mothers_last_name).to eq('sepulveda') expect(rfc.birth_date).to eq('1994-03-19') expect(rfc.rfc).to eq('SUSB940319BA5') end end end
Version data entries
8 entries across 8 versions & 1 rubygems