mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
Plugins base (#613)
* wip * wip * cleanup * notification channels * phpstan * services * remove server types * refactoring * refactoring
This commit is contained in:
@ -3,6 +3,9 @@
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\SourceControl;
|
||||
use App\SourceControlProviders\Bitbucket;
|
||||
use App\SourceControlProviders\Github;
|
||||
use App\SourceControlProviders\Gitlab;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
@ -38,7 +41,7 @@ public function test_connect_provider(string $provider, ?string $customUrl, arra
|
||||
'url' => $customUrl,
|
||||
]);
|
||||
|
||||
if (isset($input['global'])) {
|
||||
if (isset($input['global']) && $input['global']) {
|
||||
$this->assertDatabaseHas('source_controls', [
|
||||
'provider' => $provider,
|
||||
'url' => $customUrl,
|
||||
@ -132,11 +135,11 @@ public function test_edit_source_control(string $provider, ?string $url, array $
|
||||
public static function data(): array
|
||||
{
|
||||
return [
|
||||
['github', null, ['token' => 'test']],
|
||||
['github', null, ['token' => 'test', 'global' => '1']],
|
||||
['gitlab', null, ['token' => 'test']],
|
||||
['gitlab', 'https://git.example.com/', ['token' => 'test']],
|
||||
['bitbucket', null, ['username' => 'test', 'password' => 'test']],
|
||||
[Github::id(), null, ['token' => 'test']],
|
||||
[Github::id(), null, ['token' => 'test', 'global' => true]],
|
||||
[Gitlab::id(), null, ['token' => 'test']],
|
||||
[Gitlab::id(), 'https://git.example.com/', ['token' => 'test']],
|
||||
[Bitbucket::id(), null, ['username' => 'test', 'password' => 'test']],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user