Skip to content

Commit

Permalink
Merge pull request #2 from irfanhkm/feature/user-test
Browse files Browse the repository at this point in the history
add user profile test
  • Loading branch information
irfanhkm authored Oct 27, 2020
2 parents 85e2e59 + 4476d88 commit 49e2ef8
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions tests/Unit/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

namespace Tests\Unit;

use App\Domain\UserManagements\Application\UserApplication;
use App\Domain\UserManagements\Model\UserModel;
use Tests\TestCase;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
use App\Domain\UserManagements\Model\UserModel;
use Illuminate\Foundation\Testing\RefreshDatabase;
use App\Http\Controllers\Api\V1\User\UserController;
use App\Domain\UserManagements\Application\UserApplication;

class UserTest extends TestCase
{
Expand All @@ -30,4 +31,20 @@ public function testRegister()
'email' => '[email protected]'
]);
}

/**
* a user test profile
*
* @return void
*/
public function testUserProfile()
{
$controller = new UserController();
$response = $controller->profile();

$this->assertContains([
"name" => "irfan",
"email" => "[email protected]"
], $response);
}
}

0 comments on commit 49e2ef8

Please sign in to comment.