Permalink
Browse files

Fix lon/lat confusion.

  • Loading branch information...
dblock committed Sep 23, 2018
1 parent c1fb009 commit 9fc79daebd43f9488d68fd5259c86f95954afd97
@@ -2,6 +2,6 @@
name 'Location'
description 'A geo location.'

field :latitude, !types.Float, 'Lat.', property: :x
field :longitude, !types.Float, 'Lon.', property: :y
field :longitude, !types.Float, 'Longitude.', property: :x
field :latitude, !types.Float, 'Latitude.', property: :y
end
@@ -12,7 +12,10 @@
title
started
finished
location
location {
latitude
longitude
}
},
meetingEdge {
node {
@@ -43,6 +46,8 @@
expect(meeting.title).to eq title
expect(DateTime.parse(meeting.started)).to eq started_at.utc.iso8601
expect(DateTime.parse(meeting.finished)).to eq finished_at.utc.iso8601
expect(meeting.location.latitude).to eq location[:latitude]
expect(meeting.location.longitude).to eq location[:longitude]

edge = response.data.create_meeting.meeting_edge
expect(edge.node.id).to eq meeting.id
@@ -31,7 +31,7 @@
expect(returned_meeting.title).to eq meeting.title
expect(returned_meeting.started).to eq meeting.started_at.utc.iso8601
expect(returned_meeting.finished).to eq meeting.finished_at.utc.iso8601
expect(returned_meeting.location.latitude).to eq meeting.location.x
expect(returned_meeting.location.longitude).to eq meeting.location.y
expect(returned_meeting.location.longitude).to eq meeting.location.to_hsh(:lon, :lat)[:lon]
expect(returned_meeting.location.latitude).to eq meeting.location.to_hsh(:lon, :lat)[:lat]
end
end

0 comments on commit 9fc79da

Please sign in to comment.