aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_table.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-10-20 17:16:18 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-10-20 17:16:18 -0700
commite42506f9ea58511246f638e81002947ee3c36b18 (patch)
tree5f7b88a09b345c124fffefa733d8c49343552cc6 /test/test_table.rb
parent4041d7d33ad3f0acb0b04ed51da3ae29123250cb (diff)
downloadrails-e42506f9ea58511246f638e81002947ee3c36b18.tar.gz
rails-e42506f9ea58511246f638e81002947ee3c36b18.tar.bz2
rails-e42506f9ea58511246f638e81002947ee3c36b18.zip
adding default limits when there is an offset for sqlite and mysql [#5316 state:resolved]
Diffstat (limited to 'test/test_table.rb')
-rw-r--r--test/test_table.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_table.rb b/test/test_table.rb
index 9a275402cb..d34383922c 100644
--- a/test/test_table.rb
+++ b/test/test_table.rb
@@ -6,6 +6,13 @@ module Arel
@relation = Table.new(:users)
end
+ describe 'skip' do
+ it 'should add an offset' do
+ sm = @relation.skip 2
+ sm.to_sql.must_be_like "SELECT FROM \"users\" OFFSET 2"
+ end
+ end
+
describe 'primary_key' do
it 'should return an attribute' do
@relation.primary_key.name.must_equal :id