Skip to content

Commit 7cae754

Browse files
committed
Merge pull request KnpLabs#21 from m4tthumphrey/master
Fix URL for show() method
2 parents 65e9828 + c582607 commit 7cae754

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/Github/Api/Organization/Teams.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ public function all($organization)
1616
return $this->get('orgs/'.urlencode($organization).'/teams');
1717
}
1818

19-
public function show($organization, $team)
20-
{
21-
return $this->get('orgs/'.urlencode($organization).'/teams/'.urlencode($team));
22-
}
23-
2419
public function create($organization, array $params)
2520
{
2621
if (!isset($params['name'])) {
@@ -36,6 +31,11 @@ public function create($organization, array $params)
3631
return $this->post('orgs/'.urlencode($organization).'/teams', $params);
3732
}
3833

34+
public function show($team)
35+
{
36+
return $this->get('teams/'.urlencode($team));
37+
}
38+
3939
public function update($team, array $params)
4040
{
4141
if (!isset($params['name'])) {

test/Github/Tests/Api/Organization/TeamsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ public function shouldShowOrganizationTeam()
6969
$api = $this->getApiMock();
7070
$api->expects($this->once())
7171
->method('get')
72-
->with('orgs/KnpLabs/teams/KnpWorld')
72+
->with('teams/KnpWorld')
7373
->will($this->returnValue($expectedValue));
7474

75-
$this->assertEquals($expectedValue, $api->show('KnpLabs', 'KnpWorld'));
75+
$this->assertEquals($expectedValue, $api->show('KnpWorld'));
7676
}
7777

7878
/**

0 commit comments

Comments
 (0)