Sha256: c3c5bdb61e1407ac01d18e83d617e7ade9cadb639db27d44ab2e16350841103d
Contents?: true
Size: 560 Bytes
Versions: 8
Compression:
Stored size: 560 Bytes
Contents
require 'test_helper' module Razorpay # Tests for Razorpay::Entity class ErrorTest < Minitest::Test def setup @payment_id = 'fake_payment_id' stub_get(%r{payments\/#{Regexp.quote(@payment_id)}$}, 'fake_payment') end def test_bad_request_error stub_post(%r{payments/#{@payment_id}/capture$}, 'bad_request_error', 'amount=5') assert_raises Razorpay::BadRequestError, 'It must raise BadRequestError' do payment = Razorpay::Payment.fetch(@payment_id) payment.capture(amount: 5) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems