MqDiscussionTest.php 978 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Tests\Feature;
  3. use Illuminate\Foundation\Testing\RefreshDatabase;
  4. use Illuminate\Foundation\Testing\WithFaker;
  5. use Tests\TestCase;
  6. class MqDiscussionTest extends TestCase
  7. {
  8. protected $token = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJuYmYiOjE2NjgyMzE3MTksImV4cCI6MTY5OTc2NzcxOSwidWlkIjoiYmE1NDYzZjMtNzJkMS00NDEwLTg1OGUtZWFkZDEwODg0NzEzIiwiaWQiOiI0In0.LV4ItC5VCqXpbKIXT1zePcnfi-heCf3Df63w7qbXsT1i5KJtwJJC938CLgANjqwcQFa3lrR5TqvT1kkqD-Mmgg';
  9. /**
  10. * A basic feature test example.
  11. *
  12. * @return void
  13. */
  14. public function test_store()
  15. {
  16. $response = $this->withHeaders([
  17. 'Authorization' => $this->token,
  18. ])->json('POST', '/api/v2/discussion',
  19. [
  20. 'title'=>'test'.time(),
  21. 'res_id'=>'1aebd3c0-61cc-4e5b-a56e-b98ffb7f1430',
  22. 'res_type'=>'sentence',
  23. ]);
  24. $response->assertOk();
  25. }
  26. }