aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/finder_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-10-26 12:57:11 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-10-26 12:57:11 +0000
commitdd257a3ccb30ab181cd48d3d81bc7f23bb45f36f (patch)
tree998dbc9030fe3a8dc6538cbf7e5b747fdc93c8b7 /activerecord/test/finder_test.rb
parent50f7c9a98bf0511872e0b22e8434de3743ebc4ad (diff)
downloadrails-dd257a3ccb30ab181cd48d3d81bc7f23bb45f36f.tar.gz
rails-dd257a3ccb30ab181cd48d3d81bc7f23bb45f36f.tar.bz2
rails-dd257a3ccb30ab181cd48d3d81bc7f23bb45f36f.zip
Fixed handling of nil number columns on Oracle and cleaned up tests for Oracle in general #2555 [schoenm@earthlink.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/finder_test.rb')
-rw-r--r--activerecord/test/finder_test.rb18
1 files changed, 6 insertions, 12 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb
index e1ec629fd5..bfaed76a56 100644
--- a/activerecord/test/finder_test.rb
+++ b/activerecord/test/finder_test.rb
@@ -47,20 +47,14 @@ class FinderTest < Test::Unit::TestCase
end
def test_find_all_with_prepared_limit_and_offset
- if ActiveRecord::ConnectionAdapters.const_defined? :OracleAdapter
- if ActiveRecord::Base.connection.instance_of?(ActiveRecord::ConnectionAdapters::OracleAdapter)
- assert_raises(ArgumentError) { Entrant.find(:all, :order => 'id ASC', :limit => 2, :offset => 1) }
- end
- else
- entrants = Entrant.find(:all, :order => "id ASC", :limit => 2, :offset => 1)
+ entrants = Entrant.find(:all, :order => "id ASC", :limit => 2, :offset => 1)
- assert_equal(2, entrants.size)
- assert_equal(entrants(:second).name, entrants.first.name)
+ 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
+ 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
def test_find_with_entire_select_statement