6cc359a935
* Adding new method to user schema that pushes a new notification to the database with an update operation instead of a save. fixes #8264 * fixing test text * changing the addUserNotificationUpdate method to a static method as requested. * Renaming to push notification * fixing comment documentation based on pr comments. * Changed the update statement to do a multi update and added a validation step. Added tests for both these cases. * Updating pushNotification method to allow a query to be passed instead of an array of userIds to make it more flexible. * Removing createdAt field from tests as it's no longer used. * Removing only from test suite
How to run tests:
npm testis equivalent togulp test:api-v3which will run, in order,gulp lint,gulp test:api-v3:unitandgulp test:api-v3:integration. If one of these fails, the wholenpm testcommand blocks and fails. Each of these commands can also be run as a standalone command.- To run the server and the integrations tests in two different terminals (to better inspect the output in the server) run
npm startin one andnpm test:api-v3:integration:separate-serverin the other