diff options
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/deprecated_finder_test.rb | 6 | ||||
-rw-r--r-- | activerecord/test/finder_test.rb | 16 |
2 files changed, 0 insertions, 22 deletions
diff --git a/activerecord/test/deprecated_finder_test.rb b/activerecord/test/deprecated_finder_test.rb index 1409e0d1d4..35c8a2379a 100755 --- a/activerecord/test/deprecated_finder_test.rb +++ b/activerecord/test/deprecated_finder_test.rb @@ -74,12 +74,6 @@ class DeprecatedFinderTest < Test::Unit::TestCase assert_nil Company.find_first(["name = :name", { :name => "37signals!" }]) assert_nil Company.find_first(["name = :name", { :name => "37signals!' OR 1=1" }]) assert_kind_of Time, Topic.find_first(["id = :id", { :id => 1 }]).written_on - assert_raises(ActiveRecord::PreparedStatementInvalid) { - Company.find_first(["id=:id and name=:name", { :id=>3 }]) - } - assert_raises(ActiveRecord::PreparedStatementInvalid) { - Company.find_first(["id=:id", { :id=>3, :name=>"37signals!" }]) - } end def test_count diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 7e73eec7ad..515ec0f777 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -157,22 +157,6 @@ class FinderTest < Test::Unit::TestCase assert_nil Company.find(:first, :conditions => ["name = :name", { :name => "37signals!" }]) assert_nil Company.find(:first, :conditions => ["name = :name", { :name => "37signals!' OR 1=1" }]) assert_kind_of Time, Topic.find(:first, :conditions => ["id = :id", { :id => 1 }]).written_on - assert_raises(ActiveRecord::PreparedStatementInvalid) { - Company.find(:first, :conditions => ["id=:id and name=:name", { :id=>3 }]) - } - assert_raises(ActiveRecord::PreparedStatementInvalid) { - Company.find(:first, :conditions => ["id=:id", { :id=>3, :name=>"37signals!" }]) - } - end - - def test_named_bind_arity - assert_nothing_raised { bind '', {} } - assert_raises(ActiveRecord::PreparedStatementInvalid) { bind '', :a => 1 } - assert_raises(ActiveRecord::PreparedStatementInvalid) { bind ':a', {} } # ' ruby-mode - assert_nothing_raised { bind ':a', :a => 1 } # ' ruby-mode - assert_raises(ActiveRecord::PreparedStatementInvalid) { bind ':a', :a => 1, :b => 2 } # ' ruby-mode - assert_nothing_raised { bind ':a :a', :a => 1 } # ' ruby-mode - assert_raises(ActiveRecord::PreparedStatementInvalid) { bind ':a :a', :a => 1, :b => 2 } # ' ruby-mode end def test_bind_enumerable |