Skip to content

Commit d21dee9

Browse files
Merge pull request #61185 from nextcloud/backport/60379/stable34
[stable34] test(settings): reduce flakiness of authorized group integration assertions
2 parents 7d4b31c + e1e0f1c commit d21dee9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

apps/settings/tests/Integration/DuplicateAssignmentIntegrationTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ public function testMapperFindsExistingRecord(): void {
150150
$created = $this->service->create($groupId, $class);
151151

152152
// Now mapper should find it
153-
$found = $this->mapper->findByGroupIdAndClass($groupId, $class);
153+
$matches = $this->mapper->findExistingGroupsForClass($class);
154154

155-
$this->assertEquals($created->getId(), $found->getId());
156-
$this->assertEquals($groupId, $found->getGroupId());
157-
$this->assertEquals($class, $found->getClass());
155+
$this->assertCount(1, $matches);
156+
$this->assertEquals($groupId, $matches[0]->getGroupId());
157+
$this->assertEquals($class, $matches[0]->getClass());
158158
}
159159
}

0 commit comments

Comments
 (0)