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

Added test cases around modifying user groups via api #14613

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

marcusmoore
Copy link
Collaborator

Description

This PR adds two test cases around functionality in the api's user controller for modifying user groups.

Type of change

  • Other...

Copy link

what-the-diff bot commented Apr 17, 2024

PR Summary

  • Introduction of new dependencies
    The file has been updated to import the 'Group' model from the 'App\Models' path. The 'Group' model is helpful for managing user group related features.

  • Addition of New Test Methods for Super User Verification
    Two new test methods have been added for security purposes.

    1. testUserGroupsAreOnlyUpdatedIfAuthenticatedUserIsSuperUser makes sure that user group roles are only altered if the user is certified as a 'Super User'.
    2. testUserGroupsCanBeClearedBySuperUser ensures that only 'Super Users' possess the ability to clear all group affiliations linked to a particular user.
  • Enhancement of Existing Test Function
    An existing test function has been supplemented with additional assertions. These assertions help in testing a condition or predicting a result, providing more robust functionality to our system's checks and balances.

@snipe snipe merged commit 29bda2e into snipe:develop Apr 18, 2024
8 checks passed
@marcusmoore marcusmoore deleted the additional-test-cases branch April 22, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants