Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure sort order of documents when verifying in query test.

  • Loading branch information...
commit f8d078cf5a870ddb274775ebb34f8ae09ed7f3d2 1 parent 5711274
@jnunemaker jnunemaker authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/functional/test_querying.rb
View
8 test/functional/test_querying.rb
@@ -566,14 +566,14 @@ def setup
lambda do
@document.where(:first_name => 'Steve').delete(@doc1.id, @doc2.id)
end.should change { @document.count }.by(-1)
- @document.all.should == [@doc1, @doc3]
+ @document.all(:order => 'first_name').should == [@doc1, @doc3]
end
should "delete_all" do
lambda do
@document.where(:first_name => 'Steph').delete_all(:last_name => "Nunemaker")
end.should change { @document.count }.by(-1)
- @document.all.should == [@doc1, @doc2]
+ @document.all(:order => 'first_name').should == [@doc1, @doc2]
end
should "destroy" do
@@ -592,7 +592,7 @@ def setup
lambda do
@document.where(:first_name => 'Steph').destroy_all(:last_name => "Nunemaker")
end.should change { @document.count }.by(-1)
- @document.all.should == [@doc1, @doc2]
+ @document.all(:order => 'first_name').should == [@doc1, @doc2]
end
end
end
@@ -967,4 +967,4 @@ def after_destroy_callback; history << :after_destroy end
@doc1.history.should == []
end
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.