1
0
Fork 0
mirror of synced 2024-09-20 03:17:30 +12:00
Commit graph

33 commits

Author SHA1 Message Date
Safwan Parkar
4a9af13f16 run formatter and linter
Run the composer format and lint commands, which I forgot to run before.
2023-08-04 23:41:29 +04:00
Safwan Parkar
0295c6ec1b improve test by removing user creation loop
The CREATE TEAM MEMBERSHIP endpoint requires the email of the user to be added to the team. If the user does not exist in the project, a new user is created with the specified email and added to the team.

The first version of the test creates 5 users, and then adds them to the newly created team. This process is more streamlined now, by using the CREATE TEAM MEMBERSHIPS behaviour to create a user on the go and create a membership for them immediately after.

I also change the way I add user IDs to the array, by using the shorthand notation instead of the `array_push` function.
2023-08-04 23:17:41 +04:00
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
Torsten Dittmann
6e5b8fab4b fix: implement new framework changes 2023-03-01 17:30:36 +05:30
fogelito
b301a64dc4 clean up some use classes not in use 2022-12-21 10:02:22 +02:00
fogelito
91db596b42 remove static $dateValidator 2022-12-19 13:21:09 +02:00
fogelito
bdc3e9f935 $dateValidator 2022-12-15 10:51:27 +02:00
Jake Barnby
7f236ed2bb
Add get membership tests 2022-09-22 20:06:30 +12:00
Steven
1abe9d4c01 Merge branch '0.16.x' into fix-datetime-attributes 2022-08-12 22:54:33 +00:00
Fawzi E. Abdulfattah
9f45bce55f Fixing #3583 - create team membership to return added person name and email
Signed-off-by: Fawzi E. Abdulfattah <iifawzie@gmail.com>
2022-07-23 01:51:58 +02:00
fogelito
bded3da5df Fix comments 2022-07-14 17:56:50 +03:00
fogelito
45ac40cc85 change function names 2022-07-13 17:02:49 +03:00
fogelito
f676a0bf9e change test validations from strings to datetime 2022-07-12 19:44:58 +03:00
fogelito
f384a3352b change class from database:: to dateTime:: 2022-07-12 16:32:39 +03:00
fogelito
05f8352837 test fix 2022-07-07 11:07:42 +03:00
fogelito
29436c1e5f Datetime change for joined and invited 2022-07-07 10:44:28 +03:00
fogelito
e07e5b5cf8 changing datetime from timestamp to datetime 2022-07-01 15:01:14 +03:00
Torsten Dittmann
bbdf70ee90 feat: use new $createdAt and $updatedAt attributes 2022-06-15 14:46:52 +02:00
Everly Precia Suresh
19300ccdd7 format files in app, src, tests 2022-05-23 14:54:50 +00:00
Matej Bačo
de7e70e275 Tests fix 2022-04-26 08:52:59 +00:00
Matej Baco
56bf7a51df Refactored 'sum' to 'total' 2022-02-27 10:57:09 +01:00
Eldad Fux
d77226e8f9 Merge branch 'master' of github.com:appwrite/appwrite into feat-database-indexing 2021-06-03 23:19:04 +03:00
Christy Jacob
404e1ace91 fix(teams): added unit test 2021-05-31 10:26:06 +05:30
Eldad Fux
fe617a48a2 Merge branch '0.8.x' of github.com:appwrite/appwrite into feat-database-indexing 2021-05-15 04:20:12 +03:00
Christy Jacob
a35a567e0e feat: added server side test 2021-05-13 20:17:35 +05:30
Eldad Fux
c173d4a2e3 More cometics 2021-05-09 21:37:47 +03:00
Eldad Fux
e009f9c60b Updated tests folder 2020-10-27 21:48:38 +02:00
Eldad Fux
b7fe52ad54 Updated tests 2020-10-15 00:11:12 +03:00
Eldad Fux
f05e8e9f0f New test for adding members from the server integration 2020-07-10 15:57:30 +03:00
Eldad Fux
0060dfe715 Fix for tests 2020-06-08 11:01:11 +03:00
Eldad Fux
46cfa9ee92 Updated $uid to $id 2020-02-17 09:16:11 +02:00
Eldad Fux
16362e85e5 Updated teams service 2020-01-19 22:02:50 +02:00
Eldad Fux
f0edf47f4f Added e2e tests to teams service 2020-01-16 16:06:28 +02:00