Module: USPS::Test::ZipCodeLookup
- Included in:
- USPS::Test
- Defined in:
- lib/usps/test/zip_code_lookup.rb
Instance Method Summary collapse
Instance Method Details
#test_zip_code_lookup_1 ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/usps/test/zip_code_lookup.rb', line 3 def test_zip_code_lookup_1 address = USPS::Address.new( :address => '6406 Ivy Lane', :city => 'Greenbelt', :state => 'MD' ) request = USPS::Request::ZipCodeLookup.new(address) address = request.send![address] assert_equal '6406 IVY LN', address.address assert_equal 'GREENBELT', address.city assert_equal 'MD', address.state assert_equal '20770', address.zip5 assert_equal '1440', address.zip4 end |
#test_zip_code_lookup_2 ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/usps/test/zip_code_lookup.rb', line 20 def test_zip_code_lookup_2 address = USPS::Address.new( :address => '8 Wildwood Drive', :city => 'Old Lyme', :state => 'CT' ) request = USPS::Request::ZipCodeLookup.new(address) address = request.send![address] assert_equal '8 WILDWOOD DR', address.address assert_equal 'OLD LYME', address.city assert_equal 'CT', address.state assert_equal '06371', address.zip5 assert_equal '1844', address.zip4 end |