From 8571e455c800d72ad3d147b01e26c2f454e2fece Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Tue, 7 May 2024 11:10:28 -0500 Subject: [PATCH] CI: Fix test to check document access --- tests/CourseBundle/Repository/CDocumentRepositoryTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/CourseBundle/Repository/CDocumentRepositoryTest.php b/tests/CourseBundle/Repository/CDocumentRepositoryTest.php index b8977a75e2..283122de46 100644 --- a/tests/CourseBundle/Repository/CDocumentRepositoryTest.php +++ b/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.