vrfs-774: fixed inconsistent test failures
This commit is contained in:
parent
d071ea9381
commit
ca65a3d50e
|
|
@ -21,16 +21,18 @@ X If no profile location is provided, and the user creates/joins a music session
|
|||
|
||||
describe "with profile location data" do
|
||||
it "should have lat/lng values" do
|
||||
@user.lat.should == @geocode1.lat
|
||||
@user.lng.should == @geocode1.lng
|
||||
geo = MaxMindGeo.find_by_city(@user.city)
|
||||
@user.lat.should == geo.lat
|
||||
@user.lng.should == geo.lng
|
||||
end
|
||||
it "should have updated lat/lng values" do
|
||||
@user.update_attributes({ :city => @geocode2.city,
|
||||
:state => @geocode2.region,
|
||||
:country => @geocode2.country,
|
||||
})
|
||||
@user.lat.should == @geocode2.lat
|
||||
@user.lng.should == @geocode2.lng
|
||||
geo = MaxMindGeo.find_by_city(@user.city)
|
||||
@user.lat.should == geo.lat
|
||||
@user.lng.should == geo.lng
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -47,8 +49,8 @@ X If no profile location is provided, and the user creates/joins a music session
|
|||
geo = JamRuby::MaxMindGeo.ip_lookup('1.1.0.255')
|
||||
geo.should_not be_nil
|
||||
@user.update_lat_lng('1.1.0.255')
|
||||
@user.lat.should == @geocode1.lat
|
||||
@user.lng.should == @geocode1.lng
|
||||
@user.lat.should == geo.lat
|
||||
@user.lng.should == geo.lng
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue