Sha256: 396afce75197db57a4c9f7c9c0dd71015f9c0b053b0e92aa69311d3870f44145

Contents?: true

Size: 623 Bytes

Versions: 2

Compression:

Stored size: 623 Bytes

Contents

require 'helper'

class TestLocation < Test::Unit::TestCase
  context "Given Locations from fixture" do
    setup do
      @locations = Songkickr::LocationResult.new(fixture_hash('locations_bar.json'))
    end

    should "properly load data from JSON" do
      assert_equal 8, @locations.results.size
      assert_equal 8, @locations.total_entries
      
      potters_bar = @locations.results.first
      assert_equal "Potters Bar", potters_bar.city
      assert_equal 51.6833, potters_bar.lat
      assert_equal -0.166667, potters_bar.lng 
      assert_equal 24426, potters_bar.metro_area["id"]
    end
    
  end  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
songkickr-0.3.3 test/songkickr/test_location.rb
songkickr-0.3.2 test/songkickr/test_location.rb