1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 17:14:03 +00:00

Pest expect chain

This commit is contained in:
Abrar Ahmad 2022-07-20 18:37:24 +05:00
parent 959ff8e9e5
commit d0e2057c5b
2 changed files with 3 additions and 4 deletions

View file

@ -16,8 +16,7 @@ test('tenants can be resolved using the cached resolver', function () {
'domain' => 'acme', 'domain' => 'acme',
]); ]);
expect($tenant->is(app(DomainTenantResolver::class)->resolve('acme')))->toBeTrue(); expect($tenant->is(app(DomainTenantResolver::class)->resolve('acme')))->toBeTrue()->toBeTrue();
expect($tenant->is(app(DomainTenantResolver::class)->resolve('acme')))->toBeTrue();
}); });
test('the underlying resolver is not touched when using the cached resolver', function () { test('the underlying resolver is not touched when using the cached resolver', function () {

View file

@ -19,11 +19,11 @@ test('job delete domains successfully', function (){
'domain' => 'bar.localhost', 'domain' => 'bar.localhost',
]); ]);
$this->assertSame($tenant->domains()->count(), 2); expect($tenant->domains()->count())->toBe(2);
(new DeleteDomains($tenant))->handle(); (new DeleteDomains($tenant))->handle();
$this->assertSame($tenant->refresh()->domains()->count(), 0); expect($tenant->refresh()->domains()->count())->toBe(0);
}); });
class DatabaseAndDomainTenant extends \Stancl\Tenancy\Tests\Etc\Tenant class DatabaseAndDomainTenant extends \Stancl\Tenancy\Tests\Etc\Tenant