diff options
author | Michael Koziarski <michael@koziarski.com> | 2005-10-06 04:15:14 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2005-10-06 04:15:14 +0000 |
commit | 656fb866f91a87677ce501d3c9ad6aba9048d00f (patch) | |
tree | c6db1f2d6fc045aa428cc7575aec87e74f1f8957 /activerecord/test/finder_test.rb | |
parent | 0639e1ca7c63afa79b54cc1eb73871026f9b473d (diff) | |
download | rails-656fb866f91a87677ce501d3c9ad6aba9048d00f.tar.gz rails-656fb866f91a87677ce501d3c9ad6aba9048d00f.tar.bz2 rails-656fb866f91a87677ce501d3c9ad6aba9048d00f.zip |
Quote booleans according the rules defined by the adapter
* SQLite schema has been updated
* Postgresql schema needs to be fixed too
Simplify AR::Base#toggle to store the boolean, not the quoted value
* expand the tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/finder_test.rb')
-rw-r--r-- | activerecord/test/finder_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 35c96288fe..c87fc7f2f2 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -100,8 +100,8 @@ class FinderTest < Test::Unit::TestCase end def test_find_on_conditions - assert Topic.find(1, :conditions => "approved = 0") - assert_raises(ActiveRecord::RecordNotFound) { Topic.find(1, :conditions => "approved = 1") } + assert Topic.find(1, :conditions => ["approved = ?", false]) + assert_raises(ActiveRecord::RecordNotFound) { Topic.find(1, :conditions => ["approved = ?", true]) } end def test_condition_interpolation |