Sha256: 238f5a5c63f204ae43c6591e26d39b257e9c181d36f7bfe09fd45bfc80f3abd3

Contents?: true

Size: 916 Bytes

Versions: 3

Compression:

Stored size: 916 Bytes

Contents

# encoding: UTF-8
require 'spec_helper'
require 'earth/air/airport'

describe Airport do
  describe "Sanity check", :sanity => true do
    it "should have all the data" do
      Airport.count.should == 5324
    end
    
    it "should use utf-8 encoding" do
      Airport.find('PDA').city.should == 'Puerto InĂ­rida'
    end
    
    it "should have name" do
      Airport.where(:name => nil).count.should == 0
    end
    
    it "should have city" do
      Airport.where(:city => nil).count.should == 0
      Airport.where(:city => '').count.should == 0
    end
    
    it "should have country code" do
      Airport.where(:country_iso_3166_code => nil).count.should == 0
    end
    
    it "should have lat/lng" do
      Airport.where(:latitude => nil).count.should == 0
      Airport.where(:longitude => nil).count.should == 0
    end
    
    # FIXME TODO check for duplicate cities in same country
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-1.0.3 spec/earth/air/airport_spec.rb
earth-1.0.2 spec/earth/air/airport_spec.rb
earth-1.0.1 spec/earth/air/airport_spec.rb