diff options
author | Kent Sibilev <ksibilev@gmail.com> | 2006-12-03 20:30:34 +0000 |
---|---|---|
committer | Kent Sibilev <ksibilev@gmail.com> | 2006-12-03 20:30:34 +0000 |
commit | abe8fa73a91b72e79717673393a4f5bc5cd341f7 (patch) | |
tree | 1c7f3233c0ea1ecceb5d4634b7ab9575a263ac89 /actionwebservice/test | |
parent | db459370f8986f3de20c7c20fdcaf3ee811f292a (diff) | |
download | rails-abe8fa73a91b72e79717673393a4f5bc5cd341f7.tar.gz rails-abe8fa73a91b72e79717673393a4f5bc5cd341f7.tar.bz2 rails-abe8fa73a91b72e79717673393a4f5bc5cd341f7.zip |
Added support for decimal types. Closes #6676.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test')
-rw-r--r-- | actionwebservice/test/client_soap_test.rb | 1 | ||||
-rw-r--r-- | actionwebservice/test/client_xmlrpc_test.rb | 1 | ||||
-rw-r--r-- | actionwebservice/test/fixtures/db_definitions/mysql.sql | 1 | ||||
-rw-r--r-- | actionwebservice/test/fixtures/users.yml | 2 |
4 files changed, 5 insertions, 0 deletions
diff --git a/actionwebservice/test/client_soap_test.rb b/actionwebservice/test/client_soap_test.rb index c03c24141f..914bf377ea 100644 --- a/actionwebservice/test/client_soap_test.rb +++ b/actionwebservice/test/client_soap_test.rb @@ -126,6 +126,7 @@ class TC_ClientSoap < Test::Unit::TestCase assert user.active? assert_kind_of Date, user.created_on assert_equal Date.today, user.created_on + assert_equal BigDecimal('12.2'), user.balance end def test_with_model diff --git a/actionwebservice/test/client_xmlrpc_test.rb b/actionwebservice/test/client_xmlrpc_test.rb index 0abd5898d8..896ec5951c 100644 --- a/actionwebservice/test/client_xmlrpc_test.rb +++ b/actionwebservice/test/client_xmlrpc_test.rb @@ -125,6 +125,7 @@ class TC_ClientXmlRpc < Test::Unit::TestCase assert user.active? assert_kind_of Time, user.created_on assert_equal Time.utc(Time.now.year, Time.now.month, Time.now.day), user.created_on + assert_equal BigDecimal('12.2'), user.balance end def test_with_model diff --git a/actionwebservice/test/fixtures/db_definitions/mysql.sql b/actionwebservice/test/fixtures/db_definitions/mysql.sql index 026f2a2c64..8e01eef453 100644 --- a/actionwebservice/test/fixtures/db_definitions/mysql.sql +++ b/actionwebservice/test/fixtures/db_definitions/mysql.sql @@ -2,6 +2,7 @@ CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `name` varchar(30) default NULL, `active` tinyint(4) default NULL, + `balance` decimal(5, 2) default NULL, `created_on` date default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; diff --git a/actionwebservice/test/fixtures/users.yml b/actionwebservice/test/fixtures/users.yml index a97d8c8486..926d6015f5 100644 --- a/actionwebservice/test/fixtures/users.yml +++ b/actionwebservice/test/fixtures/users.yml @@ -2,9 +2,11 @@ user1: id: 1 name: Kent active: 1 + balance: 12.2 created_on: <%= Date.today %> user2: id: 2 name: David active: 1 + balance: 16.4 created_on: <%= Date.today %> |