Sha256: 7d7da03e5e324561af0d180b96436c38876edfe389c47c5961881c0d71cfe761
Contents?: true
Size: 678 Bytes
Versions: 5
Compression:
Stored size: 678 Bytes
Contents
require "test_helper" require "russianpost/client" class TestClient < MiniTest::Unit::TestCase def setup @client = RussianPost::Client.new end def test_returns_array_of_hashes_on_existing_parcel ["RD025500807SE", "LK035658376US"].each do |code| VCR.use_cassette(code) do response = @client.call(barcode: code) assert_kind_of Array, response assert_kind_of Hash, response[0] end end end def test_returns_empty_array_on_nonexistent_parcel VCR.use_cassette("RR123456789EE") do response = @client.call(barcode: "RR123456789EE") assert_kind_of Array, response assert_empty response end end end
Version data entries
5 entries across 5 versions & 1 rubygems