Files
izyim-api/tests/Feature/RegisterTest.php
T
jack 3381ce1bd8 removed example test
addded verify sms code test
2018-05-22 19:55:04 +08:00

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,
]);
}
}