Rename all ID columns that aren't unique
Having a table with a column called ID that is only part of the primary key really doesn't work as rails likes to treat ID as a special name so it becomes impossible to assign to it or read it.
This commit is contained in:
parent
b63ce5d460
commit
fc25c3d412
55 changed files with 346 additions and 356 deletions
|
@ -8,7 +8,7 @@ class OldNodeTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
def test_node_too_far_north
|
||||
invalid_node_test(:node_too_far_north)
|
||||
invalid_node_test(:node_too_far_north)
|
||||
end
|
||||
|
||||
def test_node_north_limit
|
||||
|
@ -48,7 +48,7 @@ class OldNodeTest < ActiveSupport::TestCase
|
|||
# the fixture
|
||||
def valid_node_test(nod)
|
||||
node = nodes(nod)
|
||||
dbnode = Node.find(node.id)
|
||||
dbnode = Node.find(node.node_id)
|
||||
assert_equal dbnode.lat, node.latitude.to_f/SCALE
|
||||
assert_equal dbnode.lon, node.longitude.to_f/SCALE
|
||||
assert_equal dbnode.changeset_id, node.changeset_id
|
||||
|
@ -64,7 +64,7 @@ class OldNodeTest < ActiveSupport::TestCase
|
|||
# fixture
|
||||
def invalid_node_test(nod)
|
||||
node = nodes(nod)
|
||||
dbnode = Node.find(node.id)
|
||||
dbnode = Node.find(node.node_id)
|
||||
assert_equal dbnode.lat, node.latitude.to_f/SCALE
|
||||
assert_equal dbnode.lon, node.longitude.to_f/SCALE
|
||||
assert_equal dbnode.changeset_id, node.changeset_id
|
||||
|
@ -74,6 +74,4 @@ class OldNodeTest < ActiveSupport::TestCase
|
|||
#assert_equal node.tile, QuadTile.tile_for_point(nodes(nod).lat, nodes(nod).lon)
|
||||
assert_equal false, node.valid?
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue