Sha256: 3ab8c909615b7d6563f20758ebadb6d60d70ef2d28d390248158a898c5b87dca
Contents?: true
Size: 518 Bytes
Versions: 4
Compression:
Stored size: 518 Bytes
Contents
# frozen_string_literal: true require 'helper' 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
vacuum-4.0.0 | test/unit/test_response.rb |
vacuum-3.4.1 | test/unit/test_response.rb |
vacuum-3.4.0 | test/unit/test_response.rb |
vacuum-3.3.0 | test/vacuum/test_response.rb |