Skip to content

Commit

Permalink
Added another assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Apr 20, 2020
1 parent 7337b94 commit 00a389f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/LiveImportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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());
}
}

0 comments on commit 00a389f

Please sign in to comment.