forked from IMA-WorldHealth/bhima
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TEST(db): all integration tests pass STRICT MODE
This commit ensures that all integration tests pass during SQL strict mode. In particular, the following changes have been implemented: 1. Travis calls SET GLOBAL sql_mode = 'STRICT_ALL_TABLES' to ensure that it is running in SQL strict mode. 2. The following tables now use DATETIME instead of DATE (see #45) to store date entities: a. `patient` (dob, registration_date) b. `employee` (dob, date_embauche) c. `exchange_rate` (date) 3. A dependency on `chai-datetime` has been added to ensure dates are properly tested during integration tests. An example of this can be found in the Employees API tests. 4. Many controller refactors to pre-process dates or fix bugs revealed by failing tests. 5. Error handling has been moved into the `interceptors` file. Errors in the application are now functions, to be called as `new req.codes.ERROR()`. The syntax is liable to change in a future commit. 6. A series of database errors have been added to ensure that all errors are informative and handled uniformly. 7. Removed unused `errors.js` controller file. 8. Misc typos and style fixes.
- Loading branch information
Showing
41 changed files
with
603 additions
and
556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.