diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/finder_test.rb | 6 | ||||
-rw-r--r-- | activerecord/test/fixtures/db_definitions/sqlserver.drop.sql | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index bfaed76a56..7c30308a48 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -56,6 +56,12 @@ class FinderTest < Test::Unit::TestCase assert_equal(1, entrants.size) assert_equal(entrants(:third).name, entrants.first.name) end + + def test_find_with_limit_and_condition + developers = Developer.find(:all, :order => "id DESC", :conditions => "salary = 100000", :limit => 3, :offset =>7) + assert_equal(1, developers.size) + assert_equal("fixture_3", developers.first.name) + end def test_find_with_entire_select_statement topics = Topic.find_by_sql "SELECT * FROM topics WHERE author_name = 'Mary'" diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql b/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql index 4d78d6fda1..edb9aa6e8d 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql @@ -22,6 +22,6 @@ DROP TABLE authors; DROP TABLE tasks; DROP TABLE categories; DROP TABLE categories_posts; -DROP TABLE fk_test_has_pd; DROP TABLE fk_test_has_fk; +DROP TABLE fk_test_has_pk; DROP TABLE keyboards; |