Sha256: 39eb5fb97d4c5a6da928d5fb4e766f7259b6c137412813acc23104bde100498e

Contents?: true

Size: 675 Bytes

Versions: 35

Compression:

Stored size: 675 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Flickr::Photos::Geo do

  before :each do
    @flickr = SpecHelper.flickr
  end
  
  describe ".get_location" do
    it "should return the geo data (latitude and longitude and the accuracy level) for a photo" do
      location_xml = File.read(File.dirname(__FILE__) + "/../fixtures/flickr/photos/geo/get_location-0.xml")
      @flickr.should_receive(:request_over_http).and_return(location_xml)
      acctual_loc = @flickr.photos.geo.get_location(2984637736)
      acctual_loc.latitude.should == 50.041376
      acctual_loc.longitude.should == 21.999006
      acctual_loc.accuracy.should == 16
    end
  end
  
end

Version data entries

35 entries across 35 versions & 11 rubygems

Version Path
flickr_fu-0.3.4 spec/flickr/geo_spec.rb
flickr_fu-0.3.3 spec/flickr/geo_spec.rb
ayn-flickr_fu-0.3.5 spec/flickr/geo_spec.rb
ayn-flickr_fu-0.3.6 spec/flickr/geo_spec.rb
ayn-flickr_fu-0.3.7 spec/flickr/geo_spec.rb
ayn-flickr_fu-0.3.9 spec/flickr/geo_spec.rb
commonthread-flickr_fu-0.3.0 spec/flickr/geo_spec.rb
maciej-flickr_fu-0.3.0 spec/flickr/geo_spec.rb
rmm5t-flickr_fu-0.3.1 spec/flickr/geo_spec.rb
rschenk-flickr_fu-0.3.2 spec/flickr/geo_spec.rb
fotonauts-flickr_fu-0.3.13 spec/flickr/geo_spec.rb
fotonauts-flickr_fu-0.3.11 spec/flickr/geo_spec.rb
fotonauts-flickr_fu-0.3.10 spec/flickr/geo_spec.rb
fotonauts-flickr_fu-0.3.9 spec/flickr/geo_spec.rb
fotonauts-flickr_fu-0.3.8 spec/flickr/geo_spec.rb
fotonauts-flickr_fu-0.3.7 spec/flickr/geo_spec.rb
fotonauts-flickr_fu-0.3.6 spec/flickr/geo_spec.rb
flickr_fu-0.3.2 spec/flickr/geo_spec.rb
fotonauts-flickr_fu-0.3.4 spec/flickr/geo_spec.rb
fotonauts-flickr_fu-0.3.3 spec/flickr/geo_spec.rb