diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-05-27 12:24:46 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-27 12:24:46 +0100 |
commit | f8b402c5d81c7baedae9a27eebf83aa947698cc0 (patch) | |
tree | f3012914003ee63ce34abf498b5015a875273b63 /activerecord | |
parent | 9d9c96af56986b84a732aa609569b5035825f5f8 (diff) | |
parent | 888a2927b65889465ce7a1a71e87d37640a2b41b (diff) | |
download | rails-f8b402c5d81c7baedae9a27eebf83aa947698cc0.tar.gz rails-f8b402c5d81c7baedae9a27eebf83aa947698cc0.tar.bz2 rails-f8b402c5d81c7baedae9a27eebf83aa947698cc0.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/datatype_test_postgresql.rb | 8 | ||||
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/datatype_test_postgresql.rb b/activerecord/test/cases/datatype_test_postgresql.rb index 41726ce518..bff092b5d7 100644 --- a/activerecord/test/cases/datatype_test_postgresql.rb +++ b/activerecord/test/cases/datatype_test_postgresql.rb @@ -30,8 +30,8 @@ class PostgresqlDataTypeTest < ActiveRecord::TestCase @connection.execute("INSERT INTO postgresql_arrays (commission_by_quarter, nicknames) VALUES ( '{35000,21000,18000,17000}', '{foo,bar,baz}' )") @first_array = PostgresqlArray.find(1) - @connection.execute("INSERT INTO postgresql_moneys (wealth) VALUES ('$567.89')") - @connection.execute("INSERT INTO postgresql_moneys (wealth) VALUES ('-$567.89')") + @connection.execute("INSERT INTO postgresql_moneys (wealth) VALUES ('567.89'::money)") + @connection.execute("INSERT INTO postgresql_moneys (wealth) VALUES ('-567.89'::money)") @first_money = PostgresqlMoney.find(1) @second_money = PostgresqlMoney.find(2) @@ -143,11 +143,11 @@ class PostgresqlDataTypeTest < ActiveRecord::TestCase end def test_update_money - new_value = 123.45 + new_value = BigDecimal.new('123.45') assert @first_money.wealth = new_value assert @first_money.save assert @first_money.reload - assert_equal @first_money.wealth, new_value + assert_equal new_value, @first_money.wealth end def test_update_number diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 5c0f0e2ef1..80936d51f3 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -867,7 +867,7 @@ class FinderTest < ActiveRecord::TestCase end def test_with_limiting_with_custom_select - posts = Post.find(:all, :include => :author, :select => ' posts.*, authors.id as "author_id"', :limit => 3) + posts = Post.find(:all, :include => :author, :select => ' posts.*, authors.id as "author_id"', :limit => 3, :order => 'posts.id') assert_equal 3, posts.size assert_equal [0, 1, 1], posts.map(&:author_id).sort end |