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 added new material in his course (courseId: {{courseIdForMaterials}})
Post {{host}}/api/v1/courses/{{courseIdForMaterials}}/materials
Body Request
{
"title": "QA school{{categoryPostfix}}",
"data": " ",
"order": 2
}
Tests
pm.test("Status code is 400", function () {
pm.response.to.have.status(400);
});
pm.test("Response time is less than 1000ms", function () {
pm.expect(pm.response.responseTime).to.be.below(1000);
});
pm.test("Check the error message is correct", function () {
const jsonData = pm.response.json();
pm.expect(jsonData.errors[0].msg).equal("You are not allowed to use spaces only")
}); Actual behavior
Status code is 200
Response time is less than 1000 ms
New material with data which contains spaces only was added Expected behavior
Status code is 400
Response time is less than 1000 ms
New material with data which contains spaces only wasn't added
The error text ("You are not allowed to use spaces only") is correct Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Teacher added new material in his course (courseId: {{courseIdForMaterials}})
Post {{host}}/api/v1/courses/{{courseIdForMaterials}}/materials
Body Request
{
"title": "QA school{{categoryPostfix}}",
"data": " ",
"order": 2
}
Tests
pm.test("Status code is 400", function () {
pm.response.to.have.status(400);
});
pm.test("Response time is less than 1000ms", function () {
pm.expect(pm.response.responseTime).to.be.below(1000);
});
pm.test("Check the error message is correct", function () {
const jsonData = pm.response.json();
pm.expect(jsonData.errors[0].msg).equal("You are not allowed to use spaces only")
});
Actual behavior
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: