Blame view

tests/integration/Comment/Flag/FlagOnUnApprovedCommentTest.php 521 Bytes
e77200db5   nologostudio.ru   Initial commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  <?php
  
  namespace FootyRoom\Tests;
  
  class FlagOnUnApprovedCommentTest extends TestCase
  {
      use SetsUpFixtures;
  
      public function testFlagOnUnApprovedCommentIsNotAllowed()
      {
          $user = factory('FootyRoom\User\User')->make(['user_id' => 2]);
          $response = $this->actingAs($user)->json('POST', '/comments/2/flag', ['flagName' => 'rude']);
          $this->assertEquals(400, $response->status());
          $this->assertContains('The comment you are trying to flag is gone.', $response->getContent());
      }
  }