Sha256: 703f0bc0c59a950f9d4fd6658bdfb4fe3256ac74d19fe521fbb3856069ca8663

Contents?: true

Size: 730 Bytes

Versions: 7

Compression:

Stored size: 730 Bytes

Contents

require 'helper'

class TripsTest < Test::Unit::TestCase

  context "When using the Gowalla API and working with trips" do
    setup do
      @client = gowalla_test_client
    end

    should "retrieve a list of trips" do
      stub_get('https://pengwynn:0U812@api.gowalla.com/trips', 'trips.json')
      trips = @client.trips
      trips.first.name.should == 'London Pub Crawl'
      trips.first.spots.first.url.should == '/spots/164009'
    end

    should "retrieve information about a specific trip" do
      stub_get('https://pengwynn:0U812@api.gowalla.com/trips/1', 'trip.json')
      trip = @client.trip(1)
      trip.creator.last_name.should == 'Gowalla'
      trip.map_bounds.east.should == -63.457031
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gowalla-0.5.7 test/trips_test.rb
gowalla-0.5.6 test/trips_test.rb
gowalla-0.5.5 test/trips_test.rb
gowalla-0.5.4 test/trips_test.rb
gowalla-0.5.3 test/trips_test.rb
gowalla-0.5.2 test/trips_test.rb
gowalla-0.5.1 test/trips_test.rb