Sha256: d0864ae9570a3a438d08661f860431ce106e40a04e966f04c5b6000bfb04d67c
Contents?: true
Size: 528 Bytes
Versions: 1
Compression:
Stored size: 528 Bytes
Contents
# frozen_string_literal: true require 'minitest/autorun' require 'vacuum/response' module Vacuum class TestResponse < Minitest::Test def setup mock = Minitest::Mock.new mock.expect(:body, %({"ItemsResult":{"Items":[{"ASIN":"B07212L4G2"}]}})) @response = Response.new(mock) end def test_parse assert @response.parse end def test_cast_to_hash assert_kind_of Hash, @response.to_h end def test_dig assert @response.dig('ItemsResult', 'Items') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vacuum-3.2.0 | test/vacuum/test_response.rb |