Sha256: d65704ec943604cba956b3d88e6ff4cb7efaad0c0f2fa955b0f7e30c4dcfe7ee
Contents?: true
Size: 708 Bytes
Versions: 19
Compression:
Stored size: 708 Bytes
Contents
require 'helper' module Mollie class UtilTest < Test::Unit::TestCase def test_extract_id links = { 'customer' => { 'href' => 'https://api.mollie.com/v2/customers/cst_4qqhO89gsT', 'type' => 'application/hal+json' } } customer_id = Util.extract_id(links, 'customer') assert_equal 'cst_4qqhO89gsT', customer_id end def test_extract_id_missing_link links = { 'customer' => { 'href' => 'https://api.mollie.com/v2/customers/cst_4qqhO89gsT', 'type' => 'application/hal+json' } } customer_id = Util.extract_id(links, 'unknown-resource') assert_nil customer_id end end end
Version data entries
19 entries across 19 versions & 1 rubygems