Skip to content

Commit

Permalink
Merge pull request #5298 from nextcloud/bugfix/noid/fix-listed-room-test
Browse files Browse the repository at this point in the history
Fix listed room test
  • Loading branch information
nickvergessen authored Mar 5, 2021
2 parents bd0d3fd + 777f1ae commit b1a123d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/Controller/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,12 @@ public function getRooms(int $noStatusUpdate = 0): DataResponse {
* @return DataResponse
*/
public function getListedRooms(string $searchTerm = ''): DataResponse {
$event = new UserEvent($this->userId);

$rooms = $this->manager->getListedRoomsForUser($this->userId, $searchTerm);

$return = [];
foreach ($rooms as $room) {
try {
$return[] = $this->formatRoomV2andV3($room, null);
$return[] = $this->formatRoom($room, null);
} catch (RoomNotFoundException $e) {
} catch (\RuntimeException $e) {
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function userCannotFindAnyListedRooms($user, $apiVersion = 'v3') {
*/
public function userCannotFindAnyListedRoomsWithStatus($user, $statusCode, $apiVersion = 'v3') {
$this->setCurrentUser($user);
$this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/room');
$this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/listed-room');
$this->assertStatusCode($this->response, $statusCode);
}

Expand Down

0 comments on commit b1a123d

Please sign in to comment.