commit12
This commit is contained in:
@@ -9,6 +9,8 @@ use Illuminate\Support\Str;
|
||||
use Tests\Support\{DirectCostFixture,IdentityFixture};
|
||||
use Tests\TestCase;
|
||||
final class WorkshopBillingTest extends TestCase {
|
||||
use \Tests\Support\UsesModuleFixture;
|
||||
protected function moduleFixture(): string { return 'workshop'; }
|
||||
use RefreshDatabase;
|
||||
private array $f;private int $service;private string $token;
|
||||
protected function setUp(): void {parent::setUp();$this->f=DirectCostFixture::create();foreach(['manager'=>['view','prepare','generate'],'reader'=>['view','review']] as $who=>$rights){foreach($rights as $r)IdentityFixture::grant($this->f[$who]->id,$this->f['tenant'],$this->f['company'],'workshop_billing.'.$r,$this->f['unit']);IdentityFixture::grant($this->f[$who]->id,$this->f['tenant'],$this->f['company'],'workshop.view',$this->f['unit']);}$this->service=app(ServiceWorkflow::class)->save('services',null,$this->f['manager']->id,['name'=>'Serviço comercial sintético'],(string)Str::uuid())['id'];$this->login();}
|
||||
|
||||
Reference in New Issue
Block a user