mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 20:44:04 +00:00
3381ce1bd8
addded verify sms code test
37 lines
816 B
PHP
37 lines
816 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Tests\TestCase;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
class RegisterTest extends TestCase
|
|
{
|
|
/**
|
|
* A basic test example.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function testSendVerification()
|
|
{
|
|
$response = $this->json('POST', '/api/send-verification', ['phone' => '0123456789']);
|
|
$response
|
|
->assertStatus(200)
|
|
->assertJson([
|
|
'success' => true,
|
|
]);
|
|
}
|
|
|
|
public function testVerify()
|
|
{
|
|
$response = $this->json('POST', '/api/verify', ['phone' => '0123456789', 'token' => '1234']);
|
|
$response
|
|
->assertStatus(200)
|
|
->assertJson([
|
|
'success' => true,
|
|
]);
|
|
}
|
|
|
|
}
|