test/spec/openpayresource_spec.rb in openpay-1.0.10 vs test/spec/openpayresource_spec.rb in openpay-2.0.0b
- old
+ new
@@ -21,11 +21,11 @@
describe '.hash2json' do
it 'converts a ruby hash into a json string' do
- card_hash = FactoryGirl.build(:valid_card, holder_name: 'Juan')
+ card_hash = FactoryBot.build(:valid_card, holder_name: 'Juan')
json=@cards.hash2json(card_hash)
expect(json).to have_json_path('holder_name')
expect(json).to have_json_path('expiration_year')
expect(json).to have_json_path('bank_code')
@@ -37,10 +37,10 @@
describe '.json2hash' do
it 'converts json into a ruby hash' do
- card_hash = FactoryGirl.build(:valid_card, holder_name: 'Pepe')
+ card_hash = FactoryBot.build(:valid_card, holder_name: 'Pepe')
json=@cards.hash2json(card_hash)
jash=@cards.json2hash(json)
expect(jash).to be_a Hash
expect(jash['holder_name']).to match 'Pepe'
\ No newline at end of file