diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-03 12:34:22 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-03 12:34:22 +0000 |
commit | 55692003d4a230e2fc666420ce94c3b98d098f30 (patch) | |
tree | 1f74ea28e65ab28a8fdcb33b0b3c4e335066475b /activerecord/test | |
parent | c52edf2319eccf0feafcec7ac4fd0164011a06db (diff) | |
download | rails-55692003d4a230e2fc666420ce94c3b98d098f30.tar.gz rails-55692003d4a230e2fc666420ce94c3b98d098f30.tar.bz2 rails-55692003d4a230e2fc666420ce94c3b98d098f30.zip |
Fixed Base.content_columns call for SQL Server adapter #1450 [DeLynn Berry] And a bug with the offset rules
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/finder_test.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 12330b6f7c..61400f2772 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -55,6 +55,10 @@ class FinderTest < Test::Unit::TestCase assert_equal(2, entrants.size) assert_equal(entrants(:second).name, entrants.first.name) + + entrants = Entrant.find(:all, :order => "id ASC", :limit => 2, :offset => 2) + assert_equal(1, entrants.size) + assert_equal(entrants(:third).name, entrants.first.name) end end @@ -276,7 +280,7 @@ class FinderTest < Test::Unit::TestCase no_developers = Developer.find :all, :order => 'id ASC', :limit => 0 assert_equal 0, no_developers.length end - + def test_find_all_with_limit_and_offset first_three_developers = Developer.find :all, :order => 'id ASC', :limit => 3, :offset => 0 second_three_developers = Developer.find :all, :order => 'id ASC', :limit => 3, :offset => 3 |