improve 4 test
This commit is contained in:
@@ -12,33 +12,6 @@ class LoginTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
|
||||
// public function test_user_can_login()
|
||||
// {
|
||||
// $this->withoutExceptionHandling();
|
||||
//
|
||||
// $this->artisan('passport:install');
|
||||
//
|
||||
// $user = User::factory()->create();
|
||||
//
|
||||
// $response = $this->postJson('/api/auth/login', [
|
||||
// 'username' => $user->username,
|
||||
// 'password' => 'password',
|
||||
// ]);
|
||||
//
|
||||
// $token = Token::where('user_id', $user->id)->first();
|
||||
//
|
||||
// $response->assertStatus(200)
|
||||
// ->assertJson([
|
||||
// 'message' => __('messages.successful')
|
||||
// ]);
|
||||
//
|
||||
// $this->assertDatabaseHas('oauth_access_tokens' , [
|
||||
// 'user_id' => $user->id,
|
||||
// ]);
|
||||
//
|
||||
// $this->assertInstanceOf(Token::class, $token);
|
||||
// }
|
||||
|
||||
public function test_user_can_login()
|
||||
{
|
||||
$user = User::factory()
|
||||
@@ -85,6 +58,7 @@ class LoginTest extends TestCase
|
||||
'password' => __('validation.required', ['attribute' => 'رمز عبور'])
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_telephone_id_is_required()
|
||||
{
|
||||
$response = $this->postJson('/server/auth/login', [
|
||||
|
||||
Reference in New Issue
Block a user