Sha256: 75b1a8b951b3c7ed56002a8c8bfbcca69a5ee65edd14d15f8ae4c5afcb7b5bca

Contents?: true

Size: 724 Bytes

Versions: 1

Compression:

Stored size: 724 Bytes

Contents

# encoding: utf-8
$: << File.join(File.dirname(__FILE__), "..", "..")
require 'test_helper'

class TelizeTest < GeocoderTestCase

  def setup
    Geocoder.configure(ip_lookup: :telize)
  end

  def test_result_on_ip_address_search
    result = Geocoder.search("74.200.247.59").first
    assert result.is_a?(Geocoder::Result::Telize)
  end

  def test_result_components
    result = Geocoder.search("74.200.247.59").first
    assert_equal "Plano, TX 75093, United States", result.address
  end

  def test_no_results
    results = Geocoder.search("10.10.10.10")
    assert_equal 0, results.length
  end

  def test_invalid_address
    results = Geocoder.search("555.555.555.555")
    assert_equal 0, results.length
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geocoder-1.2.3 test/unit/lookups/telize_test.rb