This repository was archived by the owner on Jul 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1919 |
2020 */
2121
22- 'username_attribute ' => ['email ' => 'mail ' ],
22+ 'username_attribute ' => ['username ' => 'samaccountname ' ],
2323
2424 /*
2525 |--------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public function testAuthPasses()
5959 Adldap::shouldReceive ('users ' )->once ()->andReturn ($ mockedUsers );
6060 Adldap::shouldReceive ('authenticate ' )->once ()->andReturn (true );
6161
62- $ this ->assertTrue (Auth::attempt (['email ' => 'jdoe@email.com ' , 'password ' => '12345 ' ]));
62+ $ this ->assertTrue (Auth::attempt (['username ' => 'jdoe ' , 'password ' => '12345 ' ]));
6363
6464 $ user = Auth::user ();
6565
@@ -100,7 +100,7 @@ public function testAuthFails()
100100
101101 Adldap::shouldReceive ('users ' )->once ()->andReturn ($ mockedUsers );
102102
103- $ this ->assertFalse (Auth::attempt (['email ' => 'jdoe@email.com ' , 'password ' => '12345 ' ]));
103+ $ this ->assertFalse (Auth::attempt (['username ' => 'jdoe ' , 'password ' => '12345 ' ]));
104104 }
105105
106106 public function testAuthFailsWhenUserFound ()
@@ -127,7 +127,7 @@ public function testAuthFailsWhenUserFound()
127127 Adldap::shouldReceive ('users ' )->once ()->andReturn ($ mockedUsers );
128128 Adldap::shouldReceive ('authenticate ' )->once ()->andReturn (false );
129129
130- $ this ->assertFalse (Auth::attempt (['email ' => 'jdoe@email.com ' , 'password ' => '12345 ' ]));
130+ $ this ->assertFalse (Auth::attempt (['username ' => 'jdoe ' , 'password ' => '12345 ' ]));
131131 }
132132
133133 public function testCredentialsKeyDoesNotExist ()
You can’t perform that action at this time.
0 commit comments