Minor - fix test

pull/3984/head
Julio 4 years ago
parent 463e9aeb7b
commit 97d2ad9ae6
  1. 16
      tests/CourseBundle/Repository/CDocumentRepositoryTest.php

@ -26,7 +26,21 @@ class CDocumentRepositoryTest extends AbstractApiTest
{
// Test as admin.
$token = $this->getUserToken([]);
$response = $this->createClientWithCredentials($token)->request('GET', '/api/documents');
$this->createClientWithCredentials($token)->request('GET', '/api/documents');
$this->assertResponseStatusCodeSame(403);
$course = $this->createCourse('test');
$response = $this->createClientWithCredentials($token)->request(
'GET',
'/api/documents',
[
'query' => [
'cid' => $course->getId(),
'resourceNode.parent' => $course->getResourceNode()->getId(),
],
]
);
$this->assertResponseIsSuccessful();
// Asserts that the returned content type is JSON-LD (the default)

Loading…
Cancel
Save