Sha256: 8e3cc000c4f9f6a81b5d51dac0b8d5d0b409fb04214f8d9c4e7251aa0462949c

Contents?: true

Size: 597 Bytes

Versions: 4

Compression:

Stored size: 597 Bytes

Contents

require 'test_helper'

module Razorpay
  # Tests for Razorpay::Iin
  class RazorpayIinTest < Minitest::Test
    def setup
      @token_id = '411111'

      # Any request that ends with token/token_id
      stub_get(%r{iins/#{@token_id}$}, 'fake_iin_token')
    end

    def test_iin_should_be_defined
      refute_nil Razorpay::Iin
    end

    def test_iin_should_be_fetched
      token = Razorpay::Iin.fetch(@token_id)
      assert_instance_of Razorpay::Iin, token, 'Iin not an instance of Razorpay::Iin class'
      assert_equal @token_id, token.iin, 'token IDs do not match'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
razorpay-3.2.2 test/razorpay/test_iin.rb
razorpay-3.2.1 test/razorpay/test_iin.rb
razorpay-3.2.0 test/razorpay/test_iin.rb
razorpay-3.1.0 test/razorpay/test_iin.rb