Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Tests\Unit;
- use Tests\TestCase;
- class ArticleApiUnitTest extends TestCase
- {
- public function it_can_create_an_article()
- {
- $data = [
- 'title' => $this->faker->sentence,
- 'content' => $this->faker->paragraph
- ];
- $this->post(route('articles.store'), $data)
- ->dump()
- ->assertStatus(201)
- ->assertJson($data);
- }
- }
Add Comment
Please, Sign In to add comment