Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit f2b96ab

Browse files
committed
Added more config fallback assertions
1 parent e19ce8d commit f2b96ab

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/AdldapTest.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,23 @@ public function testConfigLoginFallback()
186186
'password' => bcrypt('Password123'),
187187
]);
188188

189-
$outcome = Auth::attempt(['email' => 'jdoe@email.com', 'password' => 'Password123']);
189+
$credentials = [
190+
'email' => 'jdoe@email.com',
191+
'password' => 'Password123',
192+
];
193+
194+
$outcome = Auth::attempt($credentials);
190195

191196
$user = \Auth::user();
192197

193198
$this->assertTrue($outcome);
194199
$this->assertInstanceOf('Adldap\Laravel\Tests\Models\User', $user);
195200
$this->assertEquals('jdoe@email.com', $user->email);
201+
202+
$this->app['config']->set('adldap_auth.login_fallback', false);
203+
204+
$outcome = Auth::attempt($credentials);
205+
206+
$this->assertFalse($outcome);
196207
}
197208
}

0 commit comments

Comments
 (0)