1
0
Fork 0
mirror of synced 2024-07-15 19:36:08 +12:00
appwrite/app/controllers/api
Safwan Parkar 451f4bee19 Fixed an incorrect test for team deletion
This commit contains changes in 3 places.

- First I changed the placement of an informative comment in the DELETE TEAM controller, and moved it outside of the loop. I did this when Steven pointed out that the behaviour I describe in the comment is for the whole loop.

- The second change is the removal of my first test. I was facing quite a few issues with creating users in the test, and ended up using the CREATE TEAM MEMBERSHIP to perform 2 actions at once -> create a new user if one doesn't exist with the provided email, and create a membership for the user. Before this approach, I had quite a bit of code that didn't work, and it seems like I removed some things that weren't supposed to be removed, and didn't change variable names where necessary. Anyway, I figured that the problem has something to do with the user being created on the client side, so I moved the test to the server side.

- The new test I implemented does the same thing as my previous failed test, but in more detailed and distinct steps. The test first creates 5 new users inside of a loop, and pushes each new user's ID to an array called 'new_users' if the response is as expected. Then a new team is created. The next step is to create memberships for all 5 users. If all these steps pass, the new team that was just created, is deleted, and we check to make sure the new users have 0 team memberships each.

Formatter and linter showed no errors. Tests were successful on localhost.
2023-08-04 15:40:42 +04:00
..
account.php Update get logs by user to pass user internal id 2023-07-19 22:49:51 -07:00
avatars.php Merge pull request #5004 from appwrite/feat-remove-validators 2023-01-26 16:03:06 +05:30
console.php fix: steven review 2023-03-31 22:48:34 +02:00
databases.php removes extra db call and uses document find method 2023-07-24 23:41:49 +05:30
functions.php Merge pull request #5402 from appwrite/fix-chunked-upload 2023-07-18 06:55:05 +03:00
graphql.php fix: graphql 2023-03-01 18:13:34 +05:30
health.php Migrate all exceptions to new signature 2022-07-26 15:24:32 +01:00
locale.php Add offline support labels on endpoints 2023-02-23 14:47:45 -08:00
projects.php fix param 2023-05-25 05:33:06 +00:00
storage.php Merge pull request #5402 from appwrite/fix-chunked-upload 2023-07-18 06:55:05 +03:00
teams.php Fixed an incorrect test for team deletion 2023-08-04 15:40:42 +04:00
users.php remove error-causing condition 2023-08-03 21:39:18 +04:00