fixed missing features
This commit is contained in:
@@ -74,6 +74,7 @@ class GiteaProviderTest extends TestCase
|
||||
|
||||
$this->assertCount(1, $repositories);
|
||||
$this->assertContainsOnlyInstancesOf(GitRepository::class, $repositories);
|
||||
$this->assertSame('https://git.example.test/api/v1', $repositories[0]->baseUrl);
|
||||
$this->assertSame('501', $repositories[0]->providerRepositoryId);
|
||||
$this->assertSame('nico/kanbangit', $repositories[0]->fullName);
|
||||
$this->assertSame('main', $repositories[0]->defaultBranch);
|
||||
@@ -113,6 +114,7 @@ class GiteaProviderTest extends TestCase
|
||||
);
|
||||
|
||||
$this->assertInstanceOf(GitRepository::class, $repository);
|
||||
$this->assertSame('https://git.example.test', $repository->baseUrl);
|
||||
$this->assertSame('501', $repository->providerRepositoryId);
|
||||
$this->assertSame('core-team', $repository->owner);
|
||||
$this->assertSame('kanbangit', $repository->name);
|
||||
@@ -138,10 +140,17 @@ class GiteaProviderTest extends TestCase
|
||||
]);
|
||||
|
||||
$branches = app(GiteaProviderClient::class)->listBranches(
|
||||
'https://git.example.test',
|
||||
'branch-token',
|
||||
'core-team',
|
||||
'kanbangit',
|
||||
new GitRepository(
|
||||
baseUrl: 'https://git.example.test',
|
||||
providerRepositoryId: '501',
|
||||
owner: 'core-team',
|
||||
name: 'kanbangit',
|
||||
fullName: 'core-team/kanbangit',
|
||||
htmlUrl: 'https://git.example.test/core-team/kanbangit',
|
||||
defaultBranch: 'main',
|
||||
isPrivate: false,
|
||||
),
|
||||
);
|
||||
|
||||
$this->assertCount(2, $branches);
|
||||
@@ -210,10 +219,17 @@ class GiteaProviderTest extends TestCase
|
||||
]);
|
||||
|
||||
$pullRequests = app(GiteaProviderClient::class)->listPullRequests(
|
||||
'https://git.example.test',
|
||||
'pull-token',
|
||||
'core-team',
|
||||
'kanbangit',
|
||||
new GitRepository(
|
||||
baseUrl: 'https://git.example.test',
|
||||
providerRepositoryId: '501',
|
||||
owner: 'core-team',
|
||||
name: 'kanbangit',
|
||||
fullName: 'core-team/kanbangit',
|
||||
htmlUrl: 'https://git.example.test/core-team/kanbangit',
|
||||
defaultBranch: 'main',
|
||||
isPrivate: false,
|
||||
),
|
||||
);
|
||||
|
||||
$this->assertCount(1, $pullRequests);
|
||||
|
||||
Reference in New Issue
Block a user