opnform-host-nginx/api/tests/Feature
Chirag Chhatrala f344764f52
Implement EnsureUserHasWorkspace Trait and Integrate into Controllers… (#741)
* Implement EnsureUserHasWorkspace Trait and Integrate into Controllers and Jobs

- Introduced the EnsureUserHasWorkspace trait to ensure users have at least one workspace when they are detached from a workspace.
- Integrated the trait into WorkspaceUserController to enforce workspace checks during user detachment.
- Updated RemoveWorkspaceGuests job to utilize the new trait for ensuring users have a workspace after detachment.
- Modified UserWorkspace model to call the ensureUserHasWorkspace method upon deletion, maintaining workspace integrity.

These changes enhance user management by ensuring that users always have a workspace, improving overall application stability.

* Add test

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-04-28 18:03:38 +02:00
..
Forms Stripe Payment (#679) 2025-04-10 12:04:25 +02:00
Integrations Email spam security (#641) 2024-12-18 13:16:27 +01:00
Submissions Partial submissions (#705) 2025-04-28 17:33:55 +02:00
Zapier Refactor FormSubmissionDataFactory to use TestHelpers trait 2025-03-04 13:38:33 +08:00
EnsureUserHasWorkspaceTest.php Implement EnsureUserHasWorkspace Trait and Integrate into Controllers… (#741) 2025-04-28 18:03:38 +02:00
FeatureFlagsControllerTest.php Fix custom-domains feature flag 2024-08-28 18:00:11 +02:00
LoginTest.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
RegisterTest.php Add reCAPTCHA support and update captcha provider handling (#647) 2024-12-18 16:35:09 +01:00
SettingsTest.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
TemplateTest.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
UserManagementTest.php Email spam security (#641) 2024-12-18 13:16:27 +01:00
VerificationTest.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
WorkspaceTest.php Add workspace update functionality (#699) 2025-02-12 13:43:55 +01:00
WorkspaceUserTest.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00