Skip to content
Snippets Groups Projects
Commit a0499e7c authored by Tobias Gross-Vogt's avatar Tobias Gross-Vogt
Browse files

path: courses -> base/courses

parent 942599fc
No related branches found
No related tags found
No related merge requests found
Pipeline #89238 passed
...@@ -23,6 +23,7 @@ use Symfony\Component\Serializer\Annotation\Groups; ...@@ -23,6 +23,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* "get_bycourse" = { * "get_bycourse" = {
* "method" = "GET", * "method" = "GET",
* "path" = "/base/courses/{identifier}/attendees", * "path" = "/base/courses/{identifier}/attendees",
* "security" = "is_granted('IS_AUTHENTICATED_FULLY')",
* "controller" = GetAttendeesByCourse::class, * "controller" = GetAttendeesByCourse::class,
* "read" = false, * "read" = false,
* "normalization_context" = { * "normalization_context" = {
......
...@@ -12,14 +12,35 @@ class ApiTest extends ApiTestCase ...@@ -12,14 +12,35 @@ class ApiTest extends ApiTestCase
public function testCoursesNoAuth() public function testCoursesNoAuth()
{ {
$client = self::createClient(); $client = self::createClient();
$response = $client->request('GET', '/courses'); $response = $client->request('GET', '/base/courses');
$this->assertSame(Response::HTTP_UNAUTHORIZED, $response->getStatusCode()); $this->assertSame(Response::HTTP_UNAUTHORIZED, $response->getStatusCode());
} }
public function testCourseNoAuth() public function testCourseNoAuth()
{ {
$client = self::createClient(); $client = self::createClient();
$response = $client->request('GET', '/courses/123'); $response = $client->request('GET', '/base/courses/123');
$this->assertSame(Response::HTTP_UNAUTHORIZED, $response->getStatusCode());
}
public function testAttendeesByCourseNoAuth()
{
$client = self::createClient();
$response = $client->request('GET', '/base/courses/123/attendees');
$this->assertSame(Response::HTTP_UNAUTHORIZED, $response->getStatusCode());
}
public function testCoursesByOrganizationNoAuth()
{
$client = self::createClient();
$response = $client->request('GET', '/base/organizations/123/courses');
$this->assertSame(Response::HTTP_UNAUTHORIZED, $response->getStatusCode());
}
public function testCoursesByPersonNoAuth()
{
$client = self::createClient();
$response = $client->request('GET', '/base/people/123/courses');
$this->assertSame(Response::HTTP_UNAUTHORIZED, $response->getStatusCode()); $this->assertSame(Response::HTTP_UNAUTHORIZED, $response->getStatusCode());
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment