update tests for auto create _id index

This commit is contained in:
Mike Dirolf 2009-04-22 15:23:46 -04:00
parent 02b37f6e48
commit c5ccdfe5b8
1 changed files with 4 additions and 4 deletions

View File

@ -285,9 +285,9 @@ class DBAPITest < Test::Unit::TestCase
name = @@db.create_index(@@coll.name, 'a')
list = @@db.index_information(@@coll.name)
assert_equal @@coll.index_information, list
assert_equal 1, list.length
assert_equal 2, list.length
info = list[0]
info = list[1]
assert_equal name, 'a_1'
assert_equal name, info[:name]
assert_equal 1, info[:keys]['a']
@ -298,9 +298,9 @@ class DBAPITest < Test::Unit::TestCase
def test_multiple_index_cols
name = @@db.create_index(@@coll.name, [['a', DESCENDING], ['b', ASCENDING], ['c', DESCENDING]])
list = @@db.index_information(@@coll.name)
assert_equal 1, list.length
assert_equal 2, list.length
info = list[0]
info = list[1]
assert_equal name, 'a_-1_b_1_c_-1'
assert_equal name, info[:name]
keys = info[:keys].keys