- Add‑on Checkout auf Transactions + Transaction‑ID speichern: app/Services/Addons/EventAddonCheckoutService.php
- Paket/Marketing Checkout auf Transactions: app/Services/Paddle/PaddleCheckoutService.php
- Gift‑Voucher Checkout: Customer anlegen/finden + Transactions: app/Services/GiftVouchers/
GiftVoucherCheckoutService.php
- Tests aktualisiert: tests/Feature/Tenant/EventAddonCheckoutTest.php, tests/Unit/PaddleCheckoutServiceTest.php,
tests/Unit/GiftVoucherCheckoutServiceTest.php
51 lines
1.3 KiB
PHP
51 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature\Api\Tenant;
|
|
|
|
use Illuminate\Support\Arr;
|
|
use Tests\Feature\Tenant\TenantTestCase;
|
|
|
|
class OnboardingStatusTest extends TenantTestCase
|
|
{
|
|
public function test_tenant_can_dismiss_onboarding(): void
|
|
{
|
|
$response = $this->authenticatedRequest('POST', '/api/v1/tenant/onboarding', [
|
|
'step' => 'dismissed',
|
|
]);
|
|
|
|
$response->assertOk();
|
|
|
|
$this->tenant->refresh();
|
|
|
|
$dismissedAt = Arr::get($this->tenant->settings ?? [], 'onboarding.dismissed_at');
|
|
|
|
$this->assertNotNull($dismissedAt);
|
|
|
|
$show = $this->authenticatedRequest('GET', '/api/v1/tenant/onboarding');
|
|
|
|
$show->assertOk();
|
|
$show->assertJsonPath('steps.dismissed_at', $dismissedAt);
|
|
}
|
|
|
|
public function test_tenant_can_mark_onboarding_completed(): void
|
|
{
|
|
$response = $this->authenticatedRequest('POST', '/api/v1/tenant/onboarding', [
|
|
'step' => 'completed',
|
|
'meta' => [],
|
|
]);
|
|
|
|
$response->assertOk();
|
|
|
|
$this->tenant->refresh();
|
|
|
|
$completedAt = Arr::get($this->tenant->settings ?? [], 'onboarding.completed_at');
|
|
|
|
$this->assertNotNull($completedAt);
|
|
|
|
$show = $this->authenticatedRequest('GET', '/api/v1/tenant/onboarding');
|
|
|
|
$show->assertOk();
|
|
$show->assertJsonPath('steps.completed_at', $completedAt);
|
|
}
|
|
}
|