]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add decimal(precision,scale) column to unit tests
authorOliver Gasser <oliver@flowriver.net>
Tue, 17 Dec 2013 22:08:05 +0000 (23:08 +0100)
committerOliver Gasser <oliver@flowriver.net>
Tue, 17 Dec 2013 22:08:05 +0000 (23:08 +0100)
tests/lib/db/mdb2schemareader.php
tests/lib/db/testschema.xml

index 57cafa7c76bb6517617f20a850922092ffde0c1e..faa3b8d7da05040cc40b1b0befa373f9cd021793 100644 (file)
@@ -69,6 +69,9 @@ class MDB2SchemaReader extends \PHPUnit_Framework_TestCase {
                $this->assertTrue($table->getColumn('booleanfield_true')->getDefault());
                $this->assertFalse($table->getColumn('booleanfield_false')->getDefault());
 
+               $this->assertEquals(12, $table->getColumn('decimalfield_precision_scale')->getPrecision());
+               $this->assertEquals(2, $table->getColumn('decimalfield_precision_scale')->getScale());
+
                $this->assertCount(2, $table->getIndexes());
                $this->assertEquals(array('integerfield'), $table->getIndex('primary')->getUnquotedColumns());
                $this->assertTrue($table->getIndex('primary')->isPrimary());
index 509b55ee81fd400ea1e2b38aded90a4ebe47dfce..9de804b9290c984cf123d3f0b1016edf0624ab0c 100644 (file)
                                <type>boolean</type>
                                <default>false</default>
                        </field>
+                       <field>
+                               <name>decimalfield_precision_scale</name>
+                               <type>decimal</decimal>
+                               <precision>12</precision>
+                               <scale>2</scale>
+                       </field>
 
                        <index>
                                <name>index_primary</name>