Sha256: d372f57eb1842372d078c2a2a1540d8803e747b2fb89448ed7ae6b4941954bb3

Contents?: true

Size: 621 Bytes

Versions: 7

Compression:

Stored size: 621 Bytes

Contents

require 'helper'
require 'pry'

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

    should "properly load data from JSON" do
      assert_equal 1, @locations.results.size
      assert_equal 1, @locations.total_entries

      twin_cities = @locations.results.first
      assert_equal "Twin Cities", twin_cities.city
      assert_equal 44.9801, twin_cities.lat
      assert_equal -93.2519, twin_cities.lng
      assert_equal 35130, twin_cities.metro_area.id
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
songkickr-0.5.5 test/songkickr/test_location.rb
songkickr-0.5.4 test/songkickr/test_location.rb
songkickr-0.5.3 test/songkickr/test_location.rb
songkickr-0.5.2 test/songkickr/test_location.rb
songkickr-0.5.0 test/songkickr/test_location.rb
songkickr-0.4.1 test/songkickr/test_location.rb
songkickr-0.4.0 test/songkickr/test_location.rb