File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -578,13 +578,16 @@ def test_ensure_index
578
578
@@test . ensure_index ( [ [ "x" , Mongo ::ASCENDING ] ] )
579
579
assert @@test . index_information . keys . include? "x_1"
580
580
581
+ @@test . ensure_index ( [ [ "type" , 1 ] , [ "date" , -1 ] ] )
582
+ assert @@test . index_information . keys . include? "type_1_date_-1"
583
+
581
584
@@test . drop_index ( "x_1" )
582
- assert_equal 2 , @@test . index_information . keys . count
585
+ assert_equal 3 , @@test . index_information . keys . count
583
586
@@test . drop_index ( "x_-1" )
584
- assert_equal 1 , @@test . index_information . keys . count
585
-
586
- @@test . ensure_index ( [ [ "x" , Mongo ::DESCENDING ] ] , { } ) #should work as not cached.
587
587
assert_equal 2 , @@test . index_information . keys . count
588
+
589
+ @@test . ensure_index ( [ [ "x" , Mongo ::DESCENDING ] ] , { } )
590
+ assert_equal 3 , @@test . index_information . keys . count
588
591
assert @@test . index_information . keys . include? "x_-1"
589
592
590
593
# Make sure that drop_index expires cache properly
You can’t perform that action at this time.
0 commit comments