fix bug auth login fail
WMS API/ERP-API/pipeline/head This commit looks good Details

This commit is contained in:
Husnu Setiawan 2025-02-14 17:57:29 +07:00
parent c445ee43e3
commit 3fda04a881
2 changed files with 16 additions and 0 deletions

View File

@ -2,6 +2,7 @@
namespace App\Repositories\Auth;
use Illuminate\Validation\ValidationException;
use App\Models\User;
use Hash;

View File

@ -26,4 +26,19 @@ class LoginTest extends TestCase
$response->assertStatus(200);
}
/**
* A basic feature test example.
*/
public function test_fail(): void
{
$user = User::factory()->create();
$response = $this->post('/auth/login',[
"email" => $user->email,
"password" => "fail",
]);
$response->assertStatus(422);
}
}