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 2432ce4 commit b14e008
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/acceptance/features/bootstrap/SpacesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -3153,6 +3153,13 @@ 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 = \sort(\explode(",", $value));
$actualTags = \sort(\explode(",",$responseValue));
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 b14e008

Please sign in to comment.