Fixes to CI testing

This commit is contained in:
Deon George 2022-06-12 18:32:19 +10:00
parent 849fd8d56b
commit c8162b8eb9
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Config;
use Tests\TestCase;
class AccountRoleTest extends TestCase
@ -88,6 +89,8 @@ class AccountRoleTest extends TestCase
// For each site
foreach ($this->setup['site'] as $site => $so) {
Config::set('site',$so);
// Foreach user
foreach ($this->setup['user'] as $user => $uo) {
if ($site !== $user)

View File

@ -5,6 +5,7 @@ namespace Tests\Feature;
use Carbon\Carbon;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Config;
use Tests\TestCase;
use App\Models\{Account,Group,Invoice,Product,Service,Site};
@ -58,6 +59,7 @@ class InvoiceTest extends TestCase
]);
$o->setRelation('product',$po);
Config::set('site',Arr::get($this->setup,'site.a'));
$this->assertEquals(110,$o->next_invoice_items(FALSE)->sum('total'),'Invoice Equals 110');