forked from pt-dot/api-testing-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from irfanhkm/feature/user-test
add user profile test
- Loading branch information
Showing
1 changed file
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
@@ -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); | ||
} | ||
} |