Skip to content

Commit

Permalink
adjust compare oc:tags lists
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Jun 8, 2023
1 parent 0e2055b commit 3c99877
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/acceptance/features/bootstrap/SpacesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -3153,6 +3153,15 @@ public function theResponseShouldContain(string $method, string $user, string $s
case "oc:privatelink":
Assert::assertEquals($this->getPrivateLink($user, $spaceNameOrMountPoint), $responseValue, 'cannot find private link for space or resource in the response');
break;
case "oc:tags":
// The value should be a comma-separated string of tag names.
// We do not care what order they happen to be in, so compare as sorted lists.
$expectedTags = \explode(",", $value);
$expectedTags = \sort($expectedTags);
$actualTags = \explode(",", $responseValue);
$actualTags = \sort($actualTags);
Assert::assertEquals($expectedTags, $actualTags, "wrong $findItem in the response");
break;
default:
Assert::assertEquals($value, $responseValue, "wrong $findItem in the response");
break;
Expand Down

0 comments on commit 3c99877

Please sign in to comment.