Sha256: 215b90e3ec92618e742dca53780bf934b24a15f498baf6f57abc3705115f5160
Contents?: true
Size: 668 Bytes
Versions: 2
Compression:
Stored size: 668 Bytes
Contents
require "test_helper" require "russianpost/client" class TestClient < Minitest::Test 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
russianpost-0.6.0 | test/russianpost/client_test.rb |
russianpost-0.5.1 | test/russianpost/client_test.rb |