Skip to content
Snippets Groups Projects
Select Git revision
  • 0d0b74ad8941554e2fa0c7c16404f1d77cd88140
  • master default protected
  • 1.6
  • v1.6.40
  • v1.6.39
  • v1.6.38
  • v1.6.37
  • v1.6.37.rc1
  • v1.6.36
  • 1.6.35
  • 1.6.34
  • 1.6.33
  • 1.6.32.pre2
  • 1.6.32.pre1
  • 1.6.31
  • 1.6.30
  • 1.6.29
  • 1.6.28
  • 1.6.26
  • 1.6.27
  • 1.6.26.pre1
  • 1.6.25
  • 1.6.25.pre2
23 results

doap.rdf.erb

Blame
  • nominatim_test.rb 720 B
    # encoding: utf-8
    require 'test_helper'
    
    class NominatimTest < Test::Unit::TestCase
    
      def setup
        Geocoder.configure(lookup: :nominatim)
        set_api_key!(:nominatim)
      end
    
      def test_result_components
        result = Geocoder.search("Madison Square Garden, New York, NY").first
        assert_equal "10001", result.postal_code
        assert_equal "Madison Square Garden, West 31st Street, Long Island City, New York City, New York, 10001, United States of America", result.address
      end
    
      def test_host_configuration
        Geocoder.configure(nominatim: {host: "local.com"})
        lookup = Geocoder::Lookup::Nominatim.new
        query = Geocoder::Query.new("Bluffton, SC")
        assert_match %r(http://local\.com), query.url
      end
    end