Skip to content

Instantly share code, notes, and snippets.

@alfianyusufabdullah
Last active July 9, 2021 09:11
Show Gist options
  • Save alfianyusufabdullah/4568e97e838a43ef8dc244e5f4c81944 to your computer and use it in GitHub Desktop.
Save alfianyusufabdullah/4568e97e838a43ef8dc244e5f4c81944 to your computer and use it in GitHub Desktop.
[{"name":"[Mandatory] Add Book With Complete Data","method":"POST","request":"http://localhost:{{port}}/books/","messages":["status code should be 201 | expected response to have status code 201 but got 500","response body should have correct property and value | expected { Object (status, message) } to have own property 'data'","response body data should contain bookId | Target cannot be null or undefined."]},{"name":"[Mandatory] Add Book Without Name","method":"POST","request":"http://localhost:{{port}}/books/","messages":["status code should be 400 | expected response to have status code 400 but got 500"]},{"name":"[Mandatory] Add Book with Page Read More Than Page Count","method":"POST","request":"http://localhost:{{port}}/books/","messages":["status code should be 400 | expected response to have status code 400 but got 500","response body should have correct property and value | expected 'Gagal menambahkan buku. Mohon isi nama buku' to equal 'Gagal menambahkan buku. readPage tidak boleh lebih besar dari pageCount'"]},{"name":"[Mandatory] Get All Books","method":"GET","request":"http://localhost:{{port}}/books/","messages":["the books should have contains only name and publisher property | expected [ Array(10) ] to have a length of 3 but got 10"]},{"name":"[Mandatory] Get Detail Books With Correct Id","method":"GET","request":"http://localhost:{{port}}/books/{{bookId}}/","messages":["response code should be 200 | expected response to have status code 200 but got 404","response body object should contain correct property and value | expected { Object (statusCode, error, ...) } to have own property 'status'","response body data object should contain book object | Target cannot be null or undefined.","book object should contain correct property and value | Cannot read property 'book' of undefined"]},{"name":"[Mandatory] Get Detail Books With Invalid Id","method":"GET","request":"http://localhost:{{port}}/books/xxxxx/","messages":["response code should be 404 | expected response to have status code 404 but got 500","response body object should contain correct property and value | expected { Object (statusCode, error, ...) } to have own property 'status'"]},{"name":"[Mandatory] Update Book With Complete Data","method":"PUT","request":"http://localhost:{{port}}/books/{{bookId}}/","messages":["status code should be 200 | expected response to have status code 200 but got 404","response body should have correct property and value | expected { Object (statusCode, error, ...) } to have own property 'status'"]},{"name":"[Mandatory] Update Book Without Name","method":"PUT","request":"http://localhost:{{port}}/books/{{bookId}}/","messages":["status code should be 400 | expected response to have status code 400 but got 404","response body should have correct property and value | expected { Object (statusCode, error, ...) } to have own property 'status'"]},{"name":"[Mandatory] Update Book With Page Read More Than Page Count","method":"PUT","request":"http://localhost:{{port}}/books/{{bookId}}/","messages":["status code should be 400 | expected response to have status code 400 but got 404","response body should have correct property and value | expected { Object (statusCode, error, ...) } to have own property 'status'"]},{"name":"[Mandatory] Update Book with Invalid Id","method":"PUT","request":"http://localhost:{{port}}/books/xxxxx/","messages":["response body should have correct property and value | expected 'Gagal Memperbarui Buku. ID Tidak Ditemukan' to equal 'Gagal memperbarui buku. Id tidak ditemukan'"]},{"name":"[Mandatory] Delete Book with Correct Id","method":"DELETE","request":"http://localhost:{{port}}/books/{{bookId}}/","messages":["status code should be 200 | expected response to have status code 200 but got 404","response body should have correct property and value | expected { Object (statusCode, error, ...) } to have own property 'status'"]},{"name":"[Mandatory] Delete Book with Invalid Id","method":"DELETE","request":"http://localhost:{{port}}/books/xxxxx/","messages":["response body should have correct property and value | expected 'Catatan Buku Gagal Dihapus. ID Tidak Ditemukan' to equal 'Buku gagal dihapus. Id tidak ditemukan'"]},{"name":"[Optional] Get All Reading Books","method":"GET","request":"http://localhost:{{port}}/books?reading=1","messages":["response body data object should have a array books and contains 2 items | expected [ Array(7) ] to have a length of 2 but got 7","the books should have contains only name and publisher property | expected [ Array(10) ] to have a length of 3 but got 10"]},{"name":"[Optional] Get All Unreading Books","method":"GET","request":"http://localhost:{{port}}/books?reading=0","messages":["response body data object should have a array books and contains at 2 items | expected [ Array(7) ] to have a length of 2 but got 7","the books should have contains only name and publisher property | expected [ Array(10) ] to have a length of 3 but got 10"]},{"name":"[Optional] Get All Finished Books","method":"GET","request":"http://localhost:{{port}}/books?finished=1","messages":["response body data object should have a array books and contains 1 items | expected [ Array(7) ] to have a length of 1 but got 7","the books should have contains only name and publisher property | expected [ Array(10) ] to have a length of 3 but got 10"]},{"name":"[Optional] Get All Unfinished Books","method":"GET","request":"http://localhost:{{port}}/books?finished=0","messages":["response body data object should have a array books and contains 3 items | expected [ Array(7) ] to have a length of 3 but got 7","the books should have contains only name and publisher property | expected [ Array(10) ] to have a length of 3 but got 10"]},{"name":"[Optional] Get All Books Contains \"Dicoding\" Name","method":"GET","request":"http://localhost:{{port}}/books?name=Dicoding","messages":["response body data object should have a array books and contains 2 items | expected [ Array(7) ] to have a length of 2 but got 7","the books should have contains only name and publisher property | expected [ Array(10) ] to have a length of 3 but got 10"]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment