Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dbp-relay-base-course-bundle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Relay API Gateway
dbp-relay-base-course-bundle
Commits
a0499e7c
Commit
a0499e7c
authored
3 years ago
by
Tobias Gross-Vogt
Browse files
Options
Downloads
Patches
Plain Diff
path: courses -> base/courses
parent
942599fc
No related branches found
No related tags found
No related merge requests found
Pipeline
#89238
passed
3 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Entity/CourseAttendee.php
+1
-0
1 addition, 0 deletions
src/Entity/CourseAttendee.php
tests/ApiTest.php
+23
-2
23 additions, 2 deletions
tests/ApiTest.php
with
24 additions
and
2 deletions
src/Entity/CourseAttendee.php
+
1
−
0
View file @
a0499e7c
...
...
@@ -23,6 +23,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* "get_bycourse" = {
* "method" = "GET",
* "path" = "/base/courses/{identifier}/attendees",
* "security" = "is_granted('IS_AUTHENTICATED_FULLY')",
* "controller" = GetAttendeesByCourse::class,
* "read" = false,
* "normalization_context" = {
...
...
This diff is collapsed.
Click to expand it.
tests/ApiTest.php
+
23
−
2
View file @
a0499e7c
...
...
@@ -12,14 +12,35 @@ class ApiTest extends ApiTestCase
public
function
testCoursesNoAuth
()
{
$client
=
self
::
createClient
();
$response
=
$client
->
request
(
'GET'
,
'/courses'
);
$response
=
$client
->
request
(
'GET'
,
'/
base/
courses'
);
$this
->
assertSame
(
Response
::
HTTP_UNAUTHORIZED
,
$response
->
getStatusCode
());
}
public
function
testCourseNoAuth
()
{
$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 diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment