mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 16:34:04 +00:00
Remove withPending from runForMultiple
This commit is contained in:
parent
c44a4c56d5
commit
fd809bc81a
2 changed files with 3 additions and 33 deletions
|
|
@ -169,28 +169,4 @@ class PendingTenantsTest extends TestCase
|
|||
Event::assertDispatched(PullingPendingTenant::class);
|
||||
Event::assertDispatched(PendingTenantPulled::class);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function tenancy_run_for_multiple_can_scope_pending_tenants()
|
||||
{
|
||||
config(['tenancy.pending.include_in_queries' => false]);
|
||||
|
||||
Tenant::createPending();
|
||||
Tenant::create();
|
||||
|
||||
$executedCount = 0;
|
||||
tenancy()->runForMultiple([], function () use (&$executedCount){
|
||||
$executedCount++;
|
||||
}, false);
|
||||
|
||||
self::assertEquals(1, $executedCount);
|
||||
|
||||
$executedCount = 0;
|
||||
|
||||
tenancy()->runForMultiple([], function () use (&$executedCount){
|
||||
$executedCount++;
|
||||
}, true);
|
||||
|
||||
self::assertEquals(2, $executedCount);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue