test/razorpay/test_card.rb in razorpay-3.0.1 vs test/razorpay/test_card.rb in razorpay-3.1.0

- old
+ new

@@ -17,7 +17,13 @@ def test_cards_should_be_fetched card = Razorpay::Card.fetch(@card_id) assert_instance_of Razorpay::Card, card, 'card not an instance of Razorpay::Card class' assert_equal @card_id, card.id, 'card IDs do not match' end + + def test_request_card_reference_should_be_fetched + stub_post(%r{cards/fingerprints$}, 'fake_card_reference', {"number": "4111111111111111"}) + card = Razorpay::Card.request_card_reference({"number": "4111111111111111"}) + assert_instance_of Razorpay::Entity, card, 'card not an instance of Razorpay::Card class' + end end end