AdminAccessTest.php 652 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Tests\Application\Access;
  3. use App\Tests\Application\OtWebTestCase;
  4. class AdminAccessTest extends OtWebTestCase
  5. {
  6. public function testGetAccessId(): void
  7. {
  8. $this->loginAs($this->user);
  9. $this->assertResponseIsSuccessful();
  10. $this->get('/api/admin-access/1');
  11. $this->assertResponseStatusCodeSame(200);
  12. }
  13. public function testPutAccessId(): void
  14. {
  15. $this->loginAs($this->user);
  16. $this->assertResponseIsSuccessful();
  17. $this->put('/api/admin-access/1', [
  18. 'username' => 'tata'
  19. ]);
  20. $this->assertResponseStatusCodeSame(200);
  21. }
  22. }