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
Admin added new material in his course (courseId: {{courseIdForMaterialsAdmin}}, title: Additional material {{materialPostfix}}, data: "New test desidn techniques", order: 3;) POST {{host}}/api/v1/courses/{{courseIdForMaterialsAdmin}}/materials
Admin saved in environment title of material as {{NotUniqueTitle}}
Admin tries to add new material with title which are existed
Post {{host}}/api/v1/courses/{{courseIdForMaterialsAdmin}}/materials
Body request:
{"title": "{{NotUniqueTitle}}","data": "New test desidn techniques","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 behaviour
Status code is 200
Response time is less than 1000 ms
New material with not unique title was added
Expected behaviour
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
Admin can't add new material with not unique title in his course
Admin tries to add new material with not unique title in his course - Unexpected status code
Jul 1, 2022
Tatyana-Kravchenko
changed the title
Admin tries to add new material with not unique title in his course - Unexpected status code
Admin tries to add new material with not unique title in his course - Unexpected Behaviour
Jul 1, 2022
Steps to reproduce
Admin added new material in his course (courseId: {{courseIdForMaterialsAdmin}}, title: Additional material {{materialPostfix}}, data: "New test desidn techniques", order: 3;) POST {{host}}/api/v1/courses/{{courseIdForMaterialsAdmin}}/materials
Admin saved in environment title of material as {{NotUniqueTitle}}
Admin tries to add new material with title which are existed
Post {{host}}/api/v1/courses/{{courseIdForMaterialsAdmin}}/materials
Body request:
Tests:
Actual behaviour
Expected behaviour
Status code is 403
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: