Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for the updateOfflineSites function #4083

Open
coderabbitai bot opened this issue Dec 14, 2024 · 0 comments
Open

Add tests for the updateOfflineSites function #4083

coderabbitai bot opened this issue Dec 14, 2024 · 0 comments
Assignees

Comments

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 14, 2024

The updateOfflineSites function introduced in PR #4082 lacks test coverage.

Specific tests should be added for:

  • Updating sites as offline when they're not in the active set and beyond the threshold
  • Handling empty data arrays
  • Verifying the correct MongoDB query conditions are used
  • Ensuring the SiteModel update operation is called with correct parameters

The test structure should follow the existing patterns in the file, using the same testing utilities (chai, sinon) and setup/teardown approach.

Refer to the comment: #4082 (comment)

Requester: @Baalmart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant