Skip to content

Commit

Permalink
LCH-7111 | ContentHubClient::deleteMultipleInterest() function fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kirtigarg2584 committed Sep 26, 2024
1 parent c288979 commit 0c891b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ContentHubClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,8 @@ public function deleteInterest(string $uuid, string $webhook_uuid): ResponseInte
* Response.
*/
public function deleteMultipleInterest(string $webhook_uuid, array $interest_list, string $site_role): ResponseInterface {
$options['body'] = json_encode(['uuids' => [$interest_list]]);
return $this->delete("v2/interest/$webhook_uuid/$site_role", $options);
$options['body'] = json_encode(['uuids' => $interest_list]);
return $this->delete("interest/webhook/$webhook_uuid/$site_role", $options);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions test/ContentHubClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ public function testDeleteMultipleInterest(): void {
$this->ch_client
->shouldReceive('delete')
->once()
->with("v2/interest/$webhook_uuid/$site_role", ['body' => json_encode(['uuids' => [$interest_list]])])
->with("interest/webhook/$webhook_uuid/$site_role", ['body' => json_encode(['uuids' => $interest_list])])
->andReturn($this->makeMockResponse(SymfonyResponse::HTTP_OK, [], ''));

$api_response = $this->ch_client->deleteMultipleInterest($webhook_uuid, $interest_list, 'subscriber');
Expand All @@ -984,7 +984,7 @@ public function testDeleteMultipleInterest(): void {
$this->ch_client
->shouldReceive('delete')
->once()
->with("v2/interest/$webhook_uuid/$site_role", ['body' => json_encode(['uuids' => [$interest_list]])])
->with("interest/webhook/$webhook_uuid/$site_role", ['body' => json_encode(['uuids' => $interest_list])])
->andReturn($this->makeMockResponse(SymfonyResponse::HTTP_OK, [], ''));

$api_response = $this->ch_client->deleteMultipleInterest($webhook_uuid, $interest_list, 'subscriber');
Expand Down

0 comments on commit 0c891b8

Please sign in to comment.