summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOliver Gasser <oliver@flowriver.net>2013-12-17 23:08:05 +0100
committerOliver Gasser <oliver@flowriver.net>2013-12-17 23:08:05 +0100
commit5fcbe5350c88d5949fd7fd0fdb654707d9e42d5f (patch)
treea9ec0e7015b9a0fc9e57abd6aa54fd747a9caea9 /tests
parent3b0d0e2b1f3fec67e18402b0b0ecaf03dcb6fed8 (diff)
downloadnextcloud-server-5fcbe5350c88d5949fd7fd0fdb654707d9e42d5f.tar.gz
nextcloud-server-5fcbe5350c88d5949fd7fd0fdb654707d9e42d5f.zip
Add decimal(precision,scale) column to unit tests
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/db/mdb2schemareader.php3
-rw-r--r--tests/lib/db/testschema.xml6
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/db/mdb2schemareader.php b/tests/lib/db/mdb2schemareader.php
index 57cafa7c76b..faa3b8d7da0 100644
--- a/tests/lib/db/mdb2schemareader.php
+++ b/tests/lib/db/mdb2schemareader.php
@@ -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());
diff --git a/tests/lib/db/testschema.xml b/tests/lib/db/testschema.xml
index 509b55ee81f..9de804b9290 100644
--- a/tests/lib/db/testschema.xml
+++ b/tests/lib/db/testschema.xml
@@ -53,6 +53,12 @@
<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>