From: Shaun McDonald Date: Fri, 14 Nov 2008 17:28:16 +0000 (+0000) Subject: More unit test stubs X-Git-Tag: live~8121^2~152 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/6bca4b66d14f01f716af0f11ddb96c275a3ad0dd More unit test stubs --- diff --git a/test/fixtures/current_relation_tags.yml b/test/fixtures/current_relation_tags.yml index 8185d5891..d2755bdfd 100644 --- a/test/fixtures/current_relation_tags.yml +++ b/test/fixtures/current_relation_tags.yml @@ -8,7 +8,7 @@ t2: k: 'test' v: 'yes' -t2: +t3: id: 3 k: 'test' v: 'yes' diff --git a/test/unit/node_tag_test.rb b/test/unit/node_tag_test.rb new file mode 100644 index 000000000..5e4d47953 --- /dev/null +++ b/test/unit/node_tag_test.rb @@ -0,0 +1,11 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class NodeTagTest < Test::Unit::TestCase + fixtures :current_node_tags + set_fixture_class :current_node_tags => NodeTag + + def test_node_tag_count + assert_equal 6, NodeTag.count + end + +end diff --git a/test/unit/relation_member_test.rb b/test/unit/relation_member_test.rb new file mode 100644 index 000000000..d67ac3462 --- /dev/null +++ b/test/unit/relation_member_test.rb @@ -0,0 +1,11 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class RelationMemberTest < Test::Unit::TestCase + fixtures :current_relation_members + set_fixture_class :current_relation_members => RelationMember + + def test_relation_member_count + assert_equal 5, RelationMember.count + end + +end diff --git a/test/unit/relation_tag_test.rb b/test/unit/relation_tag_test.rb new file mode 100644 index 000000000..38c8af22b --- /dev/null +++ b/test/unit/relation_tag_test.rb @@ -0,0 +1,11 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class RelationTagTest < Test::Unit::TestCase + fixtures :current_relation_tags + set_fixture_class :current_relation_tags => RelationTag + + def test_relation_tag_count + assert_equal 3, RelationTag.count + end + +end diff --git a/test/unit/relation_test.rb b/test/unit/relation_test.rb new file mode 100644 index 000000000..b5b6391ab --- /dev/null +++ b/test/unit/relation_test.rb @@ -0,0 +1,11 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class RelationTest < Test::Unit::TestCase + fixtures :current_relations + set_fixture_class :current_relations => Relation + + def test_relation_count + assert_equal 3, Relation.count + end + +end diff --git a/test/unit/trace_test.rb b/test/unit/trace_test.rb new file mode 100644 index 000000000..706455aa2 --- /dev/null +++ b/test/unit/trace_test.rb @@ -0,0 +1,11 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class TraceTest < Test::Unit::TestCase + fixtures :gpx_files + set_fixture_class :gpx_files => Trace + + def test_trace_count + assert_equal 1, Trace.count + end + +end diff --git a/test/unit/tracepoint_test.rb b/test/unit/tracepoint_test.rb new file mode 100644 index 000000000..5d4100530 --- /dev/null +++ b/test/unit/tracepoint_test.rb @@ -0,0 +1,11 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class TracepointTest < Test::Unit::TestCase + fixtures :gps_points + set_fixture_class :gps_points => Tracepoint + + def test_tracepoint_count + assert_equal 1, Tracepoint.count + end + +end diff --git a/test/unit/tracetag_test.rb b/test/unit/tracetag_test.rb new file mode 100644 index 000000000..4eaf41ed8 --- /dev/null +++ b/test/unit/tracetag_test.rb @@ -0,0 +1,11 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class TracetagTest < Test::Unit::TestCase + fixtures :gpx_file_tags + set_fixture_class :gpx_file_tags => Tracetag + + def test_tracetag_count + assert_equal 1, Tracetag.count + end + +end diff --git a/test/unit/user_token_test.rb b/test/unit/user_token_test.rb new file mode 100644 index 000000000..2bc1a2dce --- /dev/null +++ b/test/unit/user_token_test.rb @@ -0,0 +1,10 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class UserTokenTest < Test::Unit::TestCase + fixtures :users + + def test_user_token_count + assert_equal 0, UserToken.count + end + +end