1
0
Fork 0
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:
Yuki Nishijima 2014-03-08 22:46:25 -08:00
parent 2769f32ec1
commit 62d04f2bb1

View file

@ -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