Skip to content

Commit

Permalink
Fixing test expectation on index, was in the wrong order
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Ott and Durran Jordan authored and durran committed Oct 22, 2009
1 parent ee396da commit 4295b7e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/functional/test_document.rb
Expand Up @@ -721,28 +721,28 @@ class ::Thing
should "allow creating index for a key" do
@document.ensure_index :first_name
MongoMapper.ensure_indexes!
@document.should have_index('first_name_1')

@document.should have_index('first_name_1')
end

should "allow creating unique index for a key" do
@document.ensure_index :first_name, :unique => true
MongoMapper.ensure_indexes!

@document.should have_index('first_name_1')
end

should "allow creating index on multiple keys" do
@document.ensure_index [[:first_name, 1], [:last_name, -1]]
MongoMapper.ensure_indexes!
@document.should have_index('last_name_-1_first_name_1')

@document.should have_index('first_name_1_last_name_-1')
end

should "work with :index shortcut when defining key" do
@document.key :father, String, :index => true
MongoMapper.ensure_indexes!

@document.should have_index('father_1')
end
end
Expand Down

0 comments on commit 4295b7e

Please sign in to comment.