As a logged-in user I want be able to issue and return books through the library system, so that I can manage my borrowed books efficiently
Acceptance Criteria
AC 1: Book Issuance and Return Workflow
Test that the book issuance and return processes work as expected:**
When issuing a book:*
The book can be successfully issued if it’s available, the user has not reached the limit, and the form data is valid.
An error message is shown if the book has no available copies, has already been issued, or if the user has reached their limit.
When returning a book:*
The book can be successfully returned if the return confirmation is submitted, updating the book’s status and available copies.
The return process is canceled if the cancel button is pressed.*
An error is raised if an attempt is made to return a book that is not currently issued or has already been returned.
AC 2: Issued Books List Functionality
Test that the issued books list displays correctly:*
The list is paginated with the appropriate number of items per page.
The issued books are ordered by issue date in descending order.
AC 3: Page Rendering and Context
Test that all relevant pages render correctly with appropriate context:*
The home page and issued books list use the correct templates and context.
The home page displays the top three most issued books.
As a logged-in user I want be able to issue and return books through the library system, so that I can manage my borrowed books efficiently
Acceptance Criteria
AC 1: Book Issuance and Return Workflow
Test that the book issuance and return processes work as expected:**
When issuing a book:*
The book can be successfully issued if it’s available, the user has not reached the limit, and the form data is valid.
An error message is shown if the book has no available copies, has already been issued, or if the user has reached their limit.
When returning a book:*
The book can be successfully returned if the return confirmation is submitted, updating the book’s status and available copies.
The return process is canceled if the cancel button is pressed.* An error is raised if an attempt is made to return a book that is not currently issued or has already been returned.
AC 2: Issued Books List Functionality
AC 3: Page Rendering and Context
Test that all relevant pages render correctly with appropriate context:*