minor: test that already passes

This commit is contained in:
Mike Dirolf 2009-07-28 14:44:35 -04:00
parent fa80e356fe
commit 4de3f61787
1 changed files with 13 additions and 0 deletions

View File

@ -639,6 +639,19 @@ class DBAPITest < Test::Unit::TestCase
assert_equal 2, @@coll.count assert_equal 2, @@coll.count
end end
def test_find_by_oid
@@coll.clear
@@coll.save("hello" => "mike")
id = @@coll.save("hello" => "world")
assert_kind_of ObjectID, id
assert_equal "world", @@coll.find_first(:_id => id)["hello"]
@@coll.find(:_id => id).to_a.each do |doc|
assert_equal "world", doc["hello"]
end
end
def test_save_with_object_that_has_id_but_does_not_actually_exist_in_collection def test_save_with_object_that_has_id_but_does_not_actually_exist_in_collection
@@coll.clear @@coll.clear