Improve test coverage and quality

This commit is contained in:
James Cole
2019-06-16 13:16:46 +02:00
parent 1ce1a84c9e
commit 72c0d7a874
34 changed files with 3211 additions and 2524 deletions

View File

@@ -101,7 +101,7 @@ class CreateControllerTest extends TestCase
$this->session(['accounts.create.uri' => 'http://localhost']);
$this->be($this->user());
$data = [
'name' => 'new account ' . random_int(1000, 9999),
'name' => 'new account ' . $this->randomInt(),
'what' => 'asset',
];
@@ -127,7 +127,7 @@ class CreateControllerTest extends TestCase
$this->session(['accounts.create.uri' => 'http://localhost']);
$this->be($this->user());
$data = [
'name' => 'new account ' . random_int(1000, 9999),
'name' => 'new account ' . $this->randomInt(),
'what' => 'asset',
'create_another' => 1,
];
@@ -157,7 +157,7 @@ class CreateControllerTest extends TestCase
$this->session(['accounts.create.uri' => 'http://localhost']);
$this->be($this->user());
$data = [
'name' => 'new liability account ' . random_int(1000, 9999),
'name' => 'new liability account ' . $this->randomInt(),
'what' => 'liabilities',
'liability_type_id' => AccountType::where('type', AccountType::LOAN)->first()->id,
'openingBalance' => '100',

View File

@@ -205,7 +205,7 @@ class EditControllerTest extends TestCase
$this->session(['accounts.edit.uri' => 'http://localhost/javascript/account']);
$this->be($this->user());
$data = [
'name' => 'updated account ' . random_int(1000, 9999),
'name' => 'updated account ' . $this->randomInt(),
'active' => 1,
'what' => 'asset',
];
@@ -232,7 +232,7 @@ class EditControllerTest extends TestCase
$this->session(['accounts.edit.uri' => 'http://localhost']);
$this->be($this->user());
$data = [
'name' => 'updated account ' . random_int(1000, 9999),
'name' => 'updated account ' . $this->randomInt(),
'active' => 1,
'what' => 'asset',
'return_to_edit' => '1',