Änderungen (relevant):
- 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
This commit is contained in:
50
tests/Feature/Api/Tenant/OnboardingStatusTest.php
Normal file
50
tests/Feature/Api/Tenant/OnboardingStatusTest.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user