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 2 created course (id: {{createdTeacher2courseIdforChanging}})
Teacher 2 can find this course using id,
Teacher tries to change this course
Patch{{host}}/api/v1/courses
Request Body:
{
"id": {{createdTeacher2courseIdforChanging}},
"title": "New name of course How to create test cases 1656069936 {{coursePostfix}}",
"description": "Basic course about test design technique",
"visible": true,
"categoryId": {{categoryId}}
}
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 () {
const body = pm.response.json()
pm.expect(body.errors).to.equal("You're not owner of this course, you can't change/remove it")
});
Actual behavior
Status code: 404 Not Found
{
"errors": "Unable to find course record(s)"
}
Response time is less than 1000 Expected behavior
Status code: 403
Error: You're not owner of this course, you can't change/remove it
Response time is less than 1000 Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Teacher 2 created course (id: {{createdTeacher2courseIdforChanging}})
Teacher 2 can find this course using id,
Teacher tries to change this course
Patch{{host}}/api/v1/courses
Request Body:
{
"id": {{createdTeacher2courseIdforChanging}},
"title": "New name of course How to create test cases 1656069936 {{coursePostfix}}",
"description": "Basic course about test design technique",
"visible": true,
"categoryId": {{categoryId}}
}
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 () {
const body = pm.response.json()
pm.expect(body.errors).to.equal("You're not owner of this course, you can't change/remove it")
});
Actual behavior
![BugRepor_Unexpected error](https://user-images.githubusercontent.com/105992192/175575664-6716ba25-cc1c-44c4-b5c5-39dd359ab9fb.png)
Status code: 404 Not Found
{
"errors": "Unable to find course record(s)"
}
Response time is less than 1000
Expected behavior
Status code: 403
Error: You're not owner of this course, you can't change/remove it
Response time is less than 1000
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: