Created
January 4, 2022 13:52
-
-
Save kapilkarda/c73433c2767a7f7859915b98d924784d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <?php | |
| namespace Tests\Feature; | |
| use App\Models\User; | |
| use Tests\ApiTestTrait; | |
| use Tests\TestCase; | |
| class CustomerApiTest extends TestCase | |
| { | |
| use ApiTestTrait; | |
| /** | |
| * A basic feature test example. | |
| * | |
| * @return void | |
| */ | |
| public function test_example() | |
| { | |
| $user = $user = User::factory()->make()->toArray(); | |
| $this->response = $this->json( | |
| 'POST', | |
| '/api/customers', | |
| $user | |
| ); | |
| if($this->response->original['status']) { | |
| $this->response->assertStatus(200); | |
| } else { | |
| $this->response->assertStatus(500); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment