add tests

add default_rib column in mysqldump
This commit is contained in:
Peter Fontaine 2013-11-14 10:48:36 +01:00
parent 844531e1d2
commit 3d7d8c7d5d
2 changed files with 25 additions and 1 deletions

View File

@ -6511,6 +6511,7 @@ CREATE TABLE `llx_societe_rib` (
`domiciliation` varchar(255) DEFAULT NULL,
`proprio` varchar(60) DEFAULT NULL,
`owner_address` text,
`default_rib` tinyint NOT NULL DEFAULT 0,
`import_key` varchar(14) DEFAULT NULL,
PRIMARY KEY (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -140,7 +140,7 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
* testCompanyBankAccountFetch
*
* @param int $id Id of bank account
* @return void
* @return Object Bank account object
*
* @depends testCompanyBankAccountCreate
* The depends says test is run only if previous is ok
@ -161,6 +161,29 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
return $localobject;
}
/**
* testCompanyBankAccountSetAsDefault
*
* @param Object $localobject Bank account
* @return int
*
* @depends testCompanyBankAccountFetch
*/
public function testCompanyBankAccountSetAsDefault($localobject)
{
global $conf,$user,$langs,$db;
$conf=$this->savconf;
$user=$this->savuser;
$langs=$this->savlangs;
$db=$this->savdb;
$result=$localobject->setAsDefault($localobject->id);
print __METHOD__." id=".$localobject->id." result=".$result."\n";
$this->assertLessThan($result, 0);
return $localobject;
}
/**
* testCompanyBankAccountUpdate
*