You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
586 B
26 lines
586 B
<?php
|
|
|
|
namespace Tests\iLaravel;
|
|
|
|
use App\Documents\UserDocument;
|
|
use Tests\Base\FreshMongodbDatabase;
|
|
use Tests\Bootstrap;
|
|
|
|
|
|
class AuthTraitTest extends Bootstrap
|
|
{
|
|
|
|
function test_auth_provider_bind_user_via_share_database()
|
|
{
|
|
$user = UserDocument::factory()->create();
|
|
$response = $this->getJson(
|
|
route('api.ilaravels.me'),
|
|
['Authorization' => 'Bearer '. $this->getToken($user)]
|
|
);
|
|
$response->assertOk();
|
|
|
|
$result = $response->getOriginalContent();
|
|
$this->assertTrue($result->id === $user->id);
|
|
}
|
|
|
|
}
|