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 added new material in his course (courseId: {{courseIdForMaterials}}, title: Additional material {{materialPostfix}}, data: "data of material. New", order: 3;) POST {{host}}/api/v1/courses/{{courseIdForMaterials}}/materials
Teacher saved in environment title of material as {{NotUniqueTitleTeacher}}
Teacher tries to add new material with title which are existed
Post {{host}}/api/v1/courses/{{courseIdForMaterials}}/materials
Body request:
{"title": "{{NotUniqueTitleTeacher}}","data": "data of material. New","order": 3}
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 of is correct",function(){constjsonData=pm.response.json();pm.expect(jsonData.error).equal("Title of material should be unique")});
Actual behavior
Status code is 200
Response time is less than 1000 ms
New material with not unique title was added
Expected behavior
Status code is 403
Response time is less than 1000 ms
New material with not unique title wasn't added
Error message (Title of material should be unique) is correct Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered:
Tatyana-Kravchenko
changed the title
Teacher can't add new material with not unique title in his course
Teacher tries to add new material with not unique title in his course - Unexpected Status code
Jul 1, 2022
Tatyana-Kravchenko
changed the title
Teacher tries to add new material with not unique title in his course - Unexpected Status code
Teacher tries to add new material with not unique title in his course - Unexpected Behaviour
Jul 1, 2022
viraxslot
changed the title
Teacher tries to add new material with not unique title in his course - Unexpected Behaviour
Teacher tries to add new material with not unique title in his course
Jul 15, 2022
Steps to reproduce
courseId: {{courseIdForMaterials}}, title: Additional material {{materialPostfix}}, data: "data of material. New", order: 3;
) POST{{host}}/api/v1/courses/{{courseIdForMaterials}}/materials
Teacher tries to add new material with title which are existed
Post
{{host}}/api/v1/courses/{{courseIdForMaterials}}/materials
Body request:
Tests:
Actual behavior
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: