]> git.openstreetmap.org Git - rails.git/blobdiff - test/unit/relation_tag_test.rb
Fixed bad coding practice in test.
[rails.git] / test / unit / relation_tag_test.rb
index 54ee57e1e235a8392cb8b3d1f190c5ab7cc5cd5f..e091efb0f27e36ba5857beceb1d1bbcc33fd6e18 100644 (file)
@@ -77,7 +77,9 @@ class RelationTagTest < Test::Unit::TestCase
     v = "probably unique string here 3142592654"
     assert_equal 0, RelationTag.count(:conditions => ['v=?', v])
 
-    tag = RelationTag.find(:first)
+    # make sure we select a tag on a relation which has more than one tag
+    id = current_relations(:multi_tag_relation).id
+    tag = RelationTag.find(:first, :conditions => ["id = ?", id])
     tag.v = v
     tag.save!