mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:34:04 +00:00
Add a test that checks if pulling a pending tenant removes it from the pool
This commit is contained in:
parent
1899429723
commit
0769e187ac
1 changed files with 8 additions and 2 deletions
|
|
@ -95,11 +95,17 @@ test('tenancy can check for pending tenants', function () {
|
|||
});
|
||||
|
||||
test('tenancy can pull a pending tenant', function () {
|
||||
expect(Tenant::pullPending())->toBeNull();
|
||||
expect(Tenant::pullPending())->toBeInstanceOf(Tenant::class);
|
||||
});
|
||||
|
||||
test('pulling a tenant from the pending tenant pool removes it from the pool', function () {
|
||||
Tenant::createPending();
|
||||
|
||||
expect(Tenant::pullPending())->toBeInstanceOf(Tenant::class);
|
||||
expect(Tenant::onlyPending()->count())->toEqual(1);
|
||||
|
||||
Tenant::pullPendingFromPool();
|
||||
|
||||
expect(Tenant::onlyPending()->count())->toEqual(0);
|
||||
});
|
||||
|
||||
test('tenancy can create if none are pending', function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue