You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce
Teacher created course (course id: {{courseIdForMaterials}})
POST {{host}}/api/v1/courses
Request Body
{"title": "How to create test cases1 {{coursePostfix}}","description": "Basic course about test design technique","visible": true,"categoryId": {{categoryIdForMaterial}}}
Teacher added a material in this course
POST {{host}}/api/v1/courses/{{courseIdForMaterials}}/materials
{"title": "Additional material {{materialPostfix}}","data": "stringstri","order": 2}
Id the created material was saved in environment {{MaterialIdTeacher}}
Admin tries to change the teacher's material
PATCH {{host}}/api/v1/courses/{{CourseIdForChangingTeacher}}
Request Body
{"id": {{MaterialIdTeacher}},"title": "New title {{coursePostfix}}","data": "Test Design techniques 12345","order": 2}
Tests:
pm.test("Status code is 403",function(){pm.response.to.have.status(403);});pm.test("Response time is less than 1000ms",function(){pm.expect(pm.response.responseTime).to.be.below(1000);});pm.test("Error message is correct",function(){constbody=pm.response.json()pm.expect(body.errors).to.equal("You\'re not owner of this material, you can\'t change/remove it")});
Actual behavior
{
"errors": "Unable to find course record(s)"
}
Status code is 404
Response time is less than 1000ms
Expected behavior
Statuse code is 403
Response time is less than 1000ms
The text error message ("You're not owner of this material, you can't change/remove it") is correct Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered:
There are five cases sharing the same unexpected behavior (404 code and 'Unable to find course record(s)'):
1.Teacher tries to change a course created by another teacher #40;
2. Teacher tries to change a course created by admin #26, #46
3. Admin tries to change a course created by teacher #32
4. '404 not found' on admin changing the course created by another admin #54
5. This report is about similar error when Admin tries to change a teacher's material
Steps to reproduce
Teacher created course (course id: {{courseIdForMaterials}})
POST {{host}}/api/v1/courses
Request Body
Teacher added a material in this course
POST {{host}}/api/v1/courses/{{courseIdForMaterials}}/materials
Id the created material was saved in environment {{MaterialIdTeacher}}
Admin tries to change the teacher's material
PATCH {{host}}/api/v1/courses/{{CourseIdForChangingTeacher}}
Request Body
Tests:
Actual behavior
"errors": "Unable to find course record(s)"
}
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: