mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-12 15:53:46 -04:00
- Remove tests that only check markup, CSS, static text, wire:key strings, framework behavior, copied app logic, or expect(true) - Replace source-grep and Reflection checks of security fixes with tests that run the real code (shell quoting, locked properties, 403 checks, webhook fork trust, log redaction, Sentinel token cleanup) - Assert response bodies and unchanged data on API error paths - Run the Traefik version job through handle() instead of private methods - Update stale tests for scheduled task props, the default Postgres image, and the disabled transfer link of unvalidated servers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.3 KiB
PHP
38 lines
1.3 KiB
PHP
<?php
|
|
|
|
use App\Livewire\Project\New\GithubPrivateRepository;
|
|
use App\Livewire\Project\New\GithubPrivateRepositoryDeployKey;
|
|
use App\Livewire\Project\New\PublicGitRepository;
|
|
use App\Models\Team;
|
|
use App\Models\User;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Livewire\Livewire;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
beforeEach(function () {
|
|
$this->team = Team::factory()->create();
|
|
$this->user = User::factory()->create();
|
|
$this->team->members()->attach($this->user->id, ['role' => 'owner']);
|
|
|
|
$this->actingAs($this->user);
|
|
session(['currentTeam' => $this->team]);
|
|
});
|
|
|
|
describe('new application buildpack defaults', function () {
|
|
test('github app repository flow defaults to railpack', function () {
|
|
Livewire::test(GithubPrivateRepository::class, ['type' => 'private-gh-app'])
|
|
->assertSet('build_pack', 'railpack');
|
|
});
|
|
|
|
test('deploy key repository flow defaults to railpack', function () {
|
|
Livewire::test(GithubPrivateRepositoryDeployKey::class, ['type' => 'private-deploy-key'])
|
|
->assertSet('build_pack', 'railpack');
|
|
});
|
|
|
|
test('public repository flow defaults to railpack and lists railpack first', function () {
|
|
Livewire::test(PublicGitRepository::class, ['type' => 'public'])
|
|
->assertSet('build_pack', 'railpack');
|
|
});
|
|
});
|