# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql
- database: openstreetmap
- username: openstreetmap
- password: openstreetmap
+ #database: openstreetmap
+ #username: openstreetmap
+ #password: openstreetmap
+ database: osm_test
+ username: osm_test
+ password: osm_test
host: localhost
# Warning: The database defined as 'test' will be erased and
require File.dirname(__FILE__) + '/../test_helper'
class CurrentNodeTagTest < Test::Unit::TestCase
- fixtures :current_node_tags, :nodes
+ fixtures :current_node_tags, :current_nodes
+ set_fixture_class :current_nodes => :Node
+ set_fixture_class :current_node_tags => :NodeTag
def test_tag_count
assert_equal 3, NodeTag.count
+ node_tag_count(:visible_node, 1)
+ node_tag_count(:invisible_node, 1)
+ node_tag_count(:used_node_1, 1)
+ end
+
+ def node_tag_count (node, count)
+ nod = current_nodes(node)
+ assert_equal count, nod.node_tags.count
end
end
set_fixture_class :current_nodes => :Node
set_fixture_class :nodes => :OldNode
set_fixture_class :node_tags => :OldNodeTag
- set_fixture_class :currenr_node_tags => :NodeTag
+ set_fixture_class :current_node_tags => :NodeTag
def test_node_too_far_north
invalid_node_test(:node_too_far_north)