Skip to content

Commit

Permalink
Fix typo in following API call
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Radt committed Nov 3, 2017
1 parent 33e9e3f commit fc3b64d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DeezerAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function followUser($userId)
throw new DeezerAPIException('Follow user: invalid userId');
}

return $this->client->apiRequest('POST', 'user/me/following', [], sprintf('user_id=%s', $userId));
return $this->client->apiRequest('POST', 'user/me/followings', [], sprintf('user_id=%s', $userId));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/DeezerAPITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function testFollowUser()
{
$this->client->expects(static::once())
->method('apiRequest')
->with('POST', 'user/me/following', [], 'user_id=user')
->with('POST', 'user/me/followings', [], 'user_id=user')
->willReturn('{}');

self::assertEquals('{}', $this->deezerApi->followUser('user'));
Expand Down

0 comments on commit fc3b64d

Please sign in to comment.