Replies: 2 comments 1 reply
-
I have also tried this, but it says the password is incorrect it('can log in', function () {
$fake = DirectoryEmulator::setup('default');
$user = User::create([
'cn' => 'John Doe',
'samaccountname' => 'jdoe',
]);
$fake->actingAs($user);
$this->post('login', [
'username' => 'jdoe',
'password' => 'secret',
])->assertRedirect('/admin');
}); |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am an idiot. I had forgotten that I had added a Rule. After adding that to the test it works |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to test logging in with fortify. For this a want to make a test user. My problem is that I cannot seem to create a fake user with the DirectoryEmulator, if I want to set a password.
It gives me the error
This is my test
is there perhaps a default password I can use ?
Beta Was this translation helpful? Give feedback.
All reactions