September 2017
Intermediate to advanced
244 pages
6h 44m
English
There are a lot more test cases related to other Post operations (endpoints). However, the way to write test cases will remain same. So, I am skipping the so that you can write those test cases by yourself. However, just as a hint, here are some test cases you should write for practice:
tryToDeletePostWithWrongId() and it should return 404 response.tryToDeletePostWithCorrectId() and it should return 200 with JSON we set there in PostController delete() method.tryToDeletePostWithIdBelongsToOtherUserPost() it should return 403 Forbidden response because a user is only allowed to delete his/her own Post.tryToDeletePostWithoutLogin() it should return 401 Unauthenticated because only a logged in user is allowed to delete his/her ...
Read now
Unlock full access