Improve test coverage.

This commit is contained in:
James Cole
2019-08-01 06:21:44 +02:00
parent 9b574ce7ad
commit b049ca27f1
45 changed files with 336 additions and 251 deletions

View File

@@ -55,9 +55,6 @@ class ConvertToWithdrawalTest extends TestCase
*/
public function testActDeposit()
{
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
return;
$expense = $this->getRandomExpense();
$name = 'Random expense #' . $this->randomInt();
$deposit = $this->getRandomDeposit();
@@ -94,16 +91,10 @@ class ConvertToWithdrawalTest extends TestCase
*/
public function testActTransfer()
{
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
return;
$expense = $this->getRandomExpense();
$name = 'Random expense #' . $this->randomInt();
$transfer = $this->getRandomTransfer();
// journal is a transfer:
$this->assertEquals(TransactionType::TRANSFER, $transfer->transactionType->type);
// mock used stuff:
$factory = $this->mock(AccountFactory::class);
$factory->shouldReceive('setUser')->once();