mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Use the old hash syntax
This commit is contained in:
parent
2769f32ec1
commit
62d04f2bb1
1 changed files with 4 additions and 4 deletions
|
@ -123,17 +123,17 @@ if defined? Mongoid
|
|||
|
||||
context "with database:", :if => Mongoid::VERSION >= '3' do
|
||||
before :all do
|
||||
15.times { User.with(database: "default_db").create!(:salary => 1) }
|
||||
10.times { User.with(database: "other_db").create!(:salary => 1) }
|
||||
15.times { User.with(:database => "default_db").create!(:salary => 1) }
|
||||
10.times { User.with(:database => "other_db").create!(:salary => 1) }
|
||||
end
|
||||
|
||||
context "default_db" do
|
||||
subject { User.with(database: "default_db").order_by(:artist.asc).page(1) }
|
||||
subject { User.with(:database => "default_db").order_by(:artist.asc).page(1) }
|
||||
its(:total_count) { should == 15 }
|
||||
end
|
||||
|
||||
context "other_db" do
|
||||
subject { User.with(database: "other_db").order_by(:artist.asc).page(1) }
|
||||
subject { User.with(:database => "other_db").order_by(:artist.asc).page(1) }
|
||||
its(:total_count) { should == 10 }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue