Skip to content

Commit

Permalink
Added test using subdivision search
Browse files Browse the repository at this point in the history
  • Loading branch information
nkezhaya committed Oct 12, 2021
1 parent ddef1ba commit 60afaec
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/shippex/address_test.exs
Expand Up @@ -33,6 +33,19 @@ defmodule Shippex.AddressTest do
assert address.country == "US"
end

test "initialize address having non-standard subdivision" do
address = Shippex.Address.new!(%{
"address" => "18 Main St, Balleese Lower",
"city" => "Rathdrum",
"state" => "Co. Wicklow",
"postal_code" => "A67 EY91",
"country" => "Ireland"
})

assert address.state == "IE-WW"
assert address.country == "IE"
end

test "address handles the address formatting" do
address_line_1 = "9999 Hobby Ln"
address_line_2 = "Ste 900"
Expand Down

0 comments on commit 60afaec

Please sign in to comment.