mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Updated test
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
242fe33f97
commit
707bdad192
|
@ -20,7 +20,7 @@ class LdapSettingsTest extends TestCase
|
||||||
$response = $this->actingAs(User::factory()->superuser()->create())
|
$response = $this->actingAs(User::factory()->superuser()->create())
|
||||||
->post(route('settings.ldap.save', [
|
->post(route('settings.ldap.save', [
|
||||||
'ldap_enabled' => 1,
|
'ldap_enabled' => 1,
|
||||||
'ldap_username_field' => 'samaccountName',
|
'ldap_username_field' => 'samaccountname',
|
||||||
'ldap_filter' => 'uid=',
|
'ldap_filter' => 'uid=',
|
||||||
]))
|
]))
|
||||||
->assertStatus(302)
|
->assertStatus(302)
|
||||||
|
@ -30,14 +30,14 @@ class LdapSettingsTest extends TestCase
|
||||||
$this->followRedirects($response)->assertSee('alert-success');
|
$this->followRedirects($response)->assertSee('alert-success');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLdapSettingsAreValidate()
|
public function testLdapSettingsAreValidatedCorrectly()
|
||||||
{
|
{
|
||||||
$response = $this->actingAs(User::factory()->superuser()->create())
|
$response = $this->actingAs(User::factory()->superuser()->create())
|
||||||
->from(route('settings.ldap.index'))
|
->from(route('settings.ldap.index'))
|
||||||
->post(route('settings.ldap.save', [
|
->post(route('settings.ldap.save', [
|
||||||
'ldap_enabled' => 1,
|
'ldap_enabled' => 1,
|
||||||
'ldap_username_field' => 'sAMAccountName',
|
'ldap_username_field' => 'sAMAccountName',
|
||||||
'ldap_filter' => '',
|
'ldap_filter' => 'uid=',
|
||||||
]))
|
]))
|
||||||
->assertStatus(302)
|
->assertStatus(302)
|
||||||
->assertRedirect(route('settings.ldap.index'))
|
->assertRedirect(route('settings.ldap.index'))
|
||||||
|
|
Loading…
Reference in a new issue