CI: Fix test to check document access

pull/5492/head
Angel Fernando Quiroz Campos 2 years ago
parent 476601ef2a
commit 8571e455c8
  1. 5
      tests/CourseBundle/Repository/CDocumentRepositoryTest.php

@ -440,7 +440,7 @@ class CDocumentRepositoryTest extends AbstractApiTest
'headers' => ['Content-Type' => 'application/json'],
]
);
$this->assertResponseStatusCodeSame(403); // Unauthorized
$this->assertResponseStatusCodeSame(200); // Course OPEN_PLATFORM, then document is accesible
$client->request('GET', '/api/documents', [
'query' => [
@ -449,7 +449,8 @@ class CDocumentRepositoryTest extends AbstractApiTest
'cid' => $courseId,
],
]);
$this->assertResponseStatusCodeSame(200);
$this->assertResponseStatusCodeSame(200); // Course OPEN_PLATFORM, then documents is accesible
// Test access with another user. He CAN see the file, the cid is pass as a parameter
// and the course is open to the world by default.

Loading…
Cancel
Save