[tests-only][full-ci] Forwardport test for send wrong host for adding user in group (#5932)

* added test for admin trying to add user with wrong host

* added test for adding single user to a group with invalid hostname
This commit is contained in:
Prajwol Amatya
2023-03-27 15:47:55 +05:45
committed by GitHub
parent eefd1b82aa
commit 1e5bf171fe
3 changed files with 99 additions and 0 deletions
@@ -287,3 +287,27 @@ Feature: add users to group
| {'members@odata.bind': ['https://localhost:9200/graph/v1.0/users/%user_id%',,'https://localhost:9200/graph/v1.0/users/%user_id%']} |
| {'members@odata.bind'- ['https://localhost:9200/graph/v1.0/users/%user_id%','https://localhost:9200/graph/v1.0/users/%user_id%']} |
| {'members@odata.bind': ['https://localhost:9200/graph/v1.0/users/%user_id%'.'https://localhost:9200/graph/v1.0/users/%user_id%']} |
@issue-5871
Scenario: admin tries to add multiple users with wrong host
Given the administrator has given "Alice" the role "Admin" using the settings api
And these users have been created with default attributes and without skeleton files:
| username |
| Brian |
| Carol |
And user "Alice" has created a group "grp1" using the Graph API
When user "Alice" tries to add the following users to a group "grp1" at once with an invalid host using the Graph API
| username |
| Brian |
| Carol |
Then the HTTP status code should be "400"
@issue-5871
Scenario: admin tries to add single user with wrong host
Given the administrator has given "Alice" the role "Admin" using the settings api
And these users have been created with default attributes and without skeleton files:
| username |
| Brian |
And user "Alice" has created a group "grp1" using the Graph API
When user "Alice" tries to add user "Brian" to group "grp1" with an invalid host using the Graph API
Then the HTTP status code should be "400"