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
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": 5
}
Id the created material was saved in environment {{aterialIdTeacherToDelete}}
Teacher 2 tries to delete by id the teacher's material
DELETE {{host}}/api/v1/courses/{{courseIdForMaterials}}/materials/{{MaterialIdTeacherToDelete}}
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("Check the text error message is correct", function () {
const jsonData = pm.response.json();
pm.expect(jsonData.errors).equal("You're not owner of this course, you can't change/remove it")
});
Actual behavior
Status code is 200
Response time is less than 1000ms
Teacher 2 deleted the teacher's material by id
{
"result": "Success: record was removed."
}
Expected behaviour
Teacher 2 doesn't manage to delete by id the teacher's material
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:
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": 5
}
Id the created material was saved in environment {{aterialIdTeacherToDelete}}
Teacher 2 tries to delete by id the teacher's material
DELETE {{host}}/api/v1/courses/{{courseIdForMaterials}}/materials/{{MaterialIdTeacherToDelete}}
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("Check the text error message is correct", function () {
const jsonData = pm.response.json();
pm.expect(jsonData.errors).equal("You're not owner of this course, you can't change/remove it")
});
Actual behavior
{
"result": "Success: record was removed."
}
Expected behaviour
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: