-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Milestone
Description
The smart contract already prevents deleting a device that still has connected users by relying on the reference counter. However, this behavior is not yet validated in the end-to-end (e2e) test suite.
We need to extend the e2e tests to ensure:
- Devices with active user connections cannot be deleted.
- The reference counter is enforced correctly.
- Once all users are disconnected, device deletion succeeds.
Acceptance Criteria:
- Create an e2e test case that:
- Connects one or more users to a device.
- Attempts to delete the device and asserts the deletion fails with the expected error.
- Disconnects all users.
- Retries the deletion and asserts the device is successfully removed.
- Ensure the test runs reliably and covers both the fail and success scenarios.
Additional Notes:
- This test guarantees that the existing logic is preserved and prevents regressions.
- It complements unit tests by validating behavior at the integration level.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels