Skip to content

Commit 69e82d6

Browse files
committed
test: support new team endpoint, fallback to legacy if no org
1 parent ca59785 commit 69e82d6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,22 @@ public function shouldGetTeamRepositories()
126126
{
127127
$expectedValue = [['name' => 'l3l0repo']];
128128

129+
$api = $this->getApiMock();
130+
$api->expects($this->once())
131+
->method('get')
132+
->with('/orgs/KnpLabs/teams/KnpWorld/repos')
133+
->will($this->returnValue($expectedValue));
134+
135+
$this->assertEquals($expectedValue, $api->repositories('KnpWorld', 'KnpLabs'));
136+
}
137+
138+
/**
139+
* @test
140+
*/
141+
public function shouldGetTeamRepositoriesViaLegacy()
142+
{
143+
$expectedValue = [['name' => 'l3l0repo']];
144+
129145
$api = $this->getApiMock();
130146
$api->expects($this->once())
131147
->method('get')

0 commit comments

Comments
 (0)