Sha256: 4b6f3a6f5485eea499201a253ea40d4a4a2d493928f41c9cf655d37b0ae86bc9
Contents?: true
Size: 801 Bytes
Versions: 1
Compression:
Stored size: 801 Bytes
Contents
require 'test_helper' require 'razorpay/customer' require 'razorpay/collection' module Razorpay # Tests for Razorpay::Customer class RazorpayCustomerTest < Minitest::Test def setup @customer_id = 'cust_6vRXClWqnLhV14' # Any request that ends with customers/customer_id stub_get(%r{customers/#{@customer_id}$}, 'fake_customer') end def test_customer_should_be_defined refute_nil Razorpay::Customer end def test_customer_should_be_created stub_post(/customers$/, 'fake_customer', 'email=test%40razorpay.com&contact=9876543210') customer = Razorpay::Customer.create email: 'test@razorpay.com', contact: '9876543210' assert_equal 'test@razorpay.com', customer.email assert_equal '9876543210', customer.contact end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
razorpay-1.2.1 | test/razorpay/test_customer.rb |