Fixes to CI testing
This commit is contained in:
parent
849fd8d56b
commit
c8162b8eb9
@ -8,6 +8,7 @@ use Illuminate\Foundation\Testing\RefreshDatabase;
|
|||||||
use Illuminate\Foundation\Testing\WithFaker;
|
use Illuminate\Foundation\Testing\WithFaker;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\Config;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
class AccountRoleTest extends TestCase
|
class AccountRoleTest extends TestCase
|
||||||
@ -88,6 +89,8 @@ class AccountRoleTest extends TestCase
|
|||||||
|
|
||||||
// For each site
|
// For each site
|
||||||
foreach ($this->setup['site'] as $site => $so) {
|
foreach ($this->setup['site'] as $site => $so) {
|
||||||
|
Config::set('site',$so);
|
||||||
|
|
||||||
// Foreach user
|
// Foreach user
|
||||||
foreach ($this->setup['user'] as $user => $uo) {
|
foreach ($this->setup['user'] as $user => $uo) {
|
||||||
if ($site !== $user)
|
if ($site !== $user)
|
||||||
|
@ -5,6 +5,7 @@ namespace Tests\Feature;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
|
use Illuminate\Support\Facades\Config;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
use App\Models\{Account,Group,Invoice,Product,Service,Site};
|
use App\Models\{Account,Group,Invoice,Product,Service,Site};
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ class InvoiceTest extends TestCase
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$o->setRelation('product',$po);
|
$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');
|
$this->assertEquals(110,$o->next_invoice_items(FALSE)->sum('total'),'Invoice Equals 110');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user