Skip to content

Commit

Permalink
test: url encoded name
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenhoang committed Aug 28, 2024
1 parent 64f5cd1 commit b7324f6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Feature/AliasesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ public function testCanUpsertAnAlias(): void
$this->assertEquals($this->sampleAliasResponse, $this->upsertResponse);
}

public function testCanUpsertAnAliasUrlEncodedName(): void
{
$aliasedCollection = [
'collection_name' => 'companies_june11'
];
$res = $this->client()->aliases->upsert("abc123?=+/~-_- &| test'", $aliasedCollection);
$this->assertEquals(["name"=>"abc123?=+/~-_- &| test'", ...$aliasedCollection], $res);
}

public function testCanRetrieveAlias(): void
{
$response = $this->client()->aliases['companies']->retrieve();
Expand Down

0 comments on commit b7324f6

Please sign in to comment.