aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-05-21 15:07:13 -0700
committerSean Griffin <sean@thoughtbot.com>2014-05-21 15:07:29 -0700
commite45e4f44e35d6ce9868542cc2a151b2a6c497e9b (patch)
treeb68cf8fc46a61a79acee62d5ba96feb97c500ad7 /activerecord/test
parentb042f21c93959e0247d447f37644815bdc6d5851 (diff)
downloadrails-e45e4f44e35d6ce9868542cc2a151b2a6c497e9b.tar.gz
rails-e45e4f44e35d6ce9868542cc2a151b2a6c497e9b.tar.bz2
rails-e45e4f44e35d6ce9868542cc2a151b2a6c497e9b.zip
Move extract_scale to decimal type
The only type that has a scale is decimal. There's a special case where decimal columns with 0 scale are type cast to integers if the scale is not specified. Appears to only affect schema dumping.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/schema_dumper_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb
index fd0ef2f89f..61bca976f7 100644
--- a/activerecord/test/cases/schema_dumper_test.rb
+++ b/activerecord/test/cases/schema_dumper_test.rb
@@ -353,9 +353,9 @@ class SchemaDumperTest < ActiveRecord::TestCase
output = standard_dump
# Oracle supports precision up to 38 and it identifies decimals with scale 0 as integers
if current_adapter?(:OracleAdapter)
- assert_match %r{t.integer\s+"atoms_in_universe",\s+precision: 38,\s+scale: 0}, output
+ assert_match %r{t.integer\s+"atoms_in_universe",\s+precision: 38}, output
else
- assert_match %r{t.decimal\s+"atoms_in_universe",\s+precision: 55,\s+scale: 0}, output
+ assert_match %r{t.decimal\s+"atoms_in_universe",\s+precision: 55}, output
end
end