Fix RT49301
[dbsrgits/SQL-Translator.git] / t / 47postgres-producer.t
index 55d3e17..ec31cd6 100644 (file)
@@ -14,7 +14,7 @@ use FindBin qw/$Bin/;
 #=============================================================================
 
 BEGIN {
-    maybe_plan(24,
+    maybe_plan(25,
         'SQL::Translator::Producer::PostgreSQL',
         'Test::Differences',
     )
@@ -113,6 +113,16 @@ is(
     'Create time field without time zone but with size, works'
 );
 
+my $field_num = SQL::Translator::Schema::Field->new( name => 'num',
+                                                  table => $table,
+                                                  data_type => 'numeric',
+                                                  size => [10,2],
+                                                  );
+my $fieldnum_sql = SQL::Translator::Producer::PostgreSQL::create_field($field_num);
+
+is($fieldnum_sql, 'num numeric(10,2)', 'Create numeric field works');
+
+
 my $field4 = SQL::Translator::Schema::Field->new( name      => 'bytea_field',
                                                   table => $table,
                                                   data_type => 'bytea',