-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7337b94
commit 00a389f
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,16 +141,26 @@ public function test_missing_users_are_soft_deleted_when_flag_is_enabled() | |
'password' => 'secret', | ||
]); | ||
|
||
$otherDomainLdapUser = TestUserModelStub::create([ | ||
'name' => 'Betty Doe', | ||
'email' => '[email protected]', | ||
'guid' => $this->faker->uuid, | ||
'domain' => 'other', | ||
'password' => 'secret', | ||
]); | ||
|
||
$this->artisan('ldap:import', [ | ||
'provider' => 'ldap-database', | ||
'--no-interaction', | ||
'--delete-missing', | ||
])->assertExitCode(0); | ||
|
||
$this->assertFalse($missingLdapUser->fresh()->trashed()); | ||
|
||
$this->assertFalse($importedLdapUser->fresh()->trashed()); | ||
$this->assertTrue($deletedLocalUser->fresh()->trashed()); | ||
$this->assertFalse($existingLocalUser->fresh()->trashed()); | ||
$this->assertFalse($otherDomainLdapUser->fresh()->trashed()); | ||
|
||
$this->artisan('ldap:import', [ | ||
'provider' => 'ldap-database', | ||
|
@@ -170,5 +180,6 @@ public function test_missing_users_are_soft_deleted_when_flag_is_enabled() | |
$this->assertFalse($importedLdapUser->fresh()->trashed()); | ||
$this->assertTrue($deletedLocalUser->fresh()->trashed()); | ||
$this->assertFalse($existingLocalUser->fresh()->trashed()); | ||
$this->assertFalse($otherDomainLdapUser->fresh()->trashed()); | ||
} | ||
} |