Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The provided code changes implement the following:
1. **Constant for Signup API Path:** - A new object `Signup` is created within the `SignupController` class. - This object contains two constants: - `API_ACCOUNT`: Holds the base API path for account-related operations (`/api/account`). - `SIGNUP_API_PATH`: Combines the base path with the specific signup endpoint (`/api/account/signup`). 2. **Using the Constant in Tests:** - The `SignupIntegrationTests` class now imports the `SIGNUP_API_PATH` constant. - The test case `SignupController - test signup avec un account valide` now uses this constant when making a POST request to the signup endpoint. **Benefits of these changes:** - **Improved Code Readability:** Using constants for API paths makes the code easier to understand and maintain. - **Reduced Duplication:** Defining the API path in one place avoids repetition and ensures consistency across the codebase. - **Easier Refactoring:** If the API path needs to change in the future, it only needs to be updated in one location. **Overall:** These changes are a good practice and improve the quality and maintainability of the code.
- Loading branch information