mirror of
https://github.com/nextcloud/server.git
synced 2026-02-27 18:37:17 +01:00
fix(tests): Sort activities by id to get the last one
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
committed by
Côme Chilliet
parent
c9938e54a6
commit
da9b6e376d
@@ -22,6 +22,8 @@ trait Activity {
|
||||
$this->theHTTPStatusCodeShouldBe('200');
|
||||
$data = json_decode($this->response->getBody()->getContents(), true);
|
||||
$activities = $data['ocs']['data'];
|
||||
/* Sort by id */
|
||||
uasort($activities, fn ($a, $b) => $a['activity_id'] <=> $b['activity_id']);
|
||||
$lastActivity = array_pop($activities);
|
||||
foreach ($activity->getRowsHash() as $key => $value) {
|
||||
Assert::assertEquals($value, $lastActivity[$key]);
|
||||
|
||||
@@ -10,7 +10,7 @@ Feature: sharing
|
||||
And Logging in using web as "user0"
|
||||
And Sending a "POST" to "/apps/activity/settings" with requesttoken
|
||||
| public_links_notification | 1 |
|
||||
| public_links_upload_email | 1 |
|
||||
| public_links_upload_notification | 1 |
|
||||
| notify_setting_batchtime | 0 |
|
||||
| activity_digest | 0 |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user