diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-11-26 09:30:35 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-11-26 09:30:35 +0000 |
| commit | 7abf792f02366b517c243b963cbc3768e64bfe54 (patch) | |
| tree | ac2531edfa183a2aa8cd828b7a6246ddba5ad7fd /tests | |
| parent | ba8bea5599feb46d6ef487977539368bc24e5945 (diff) | |
Resolve "VA automatisch löschen wenn sie keine Mitglieder mehr hat"
Closes #4289
Merge request studip/studip!3144
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/jsonapi/UsersIndexTest.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/jsonapi/UsersIndexTest.php b/tests/jsonapi/UsersIndexTest.php index adffee6..6c79cae 100644 --- a/tests/jsonapi/UsersIndexTest.php +++ b/tests/jsonapi/UsersIndexTest.php @@ -28,7 +28,9 @@ class UsersIndexTest extends \Codeception\Test\Unit $response = $this->getUsers($credentials); $this->tester->assertTrue($response->isSuccessfulDocument([200])); - $numberOfAllUsers = \User::countBySQL(); + $vis_query = get_vis_query(context: 'search'); + $condition = "LEFT JOIN user_visibility ON (user_visibility.user_id = auth_user_md5.user_id) WHERE {$vis_query}"; + $numberOfAllUsers = \User::countBySQL($condition); $this->tester->assertSame($numberOfAllUsers, count($response->document()->primaryResources())); $this->assertValidResourceObject($response, 'users'); |
