10.April 2026
This commit is contained in:
parent
a00c42e770
commit
f58c709945
208 changed files with 19280 additions and 2914 deletions
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use App\Models\UserAbo;
|
||||
use App\Services\Incentive\IncentiveTracker;
|
||||
|
||||
it('nutzt member_id als Berater bei Kundenabo ot', function () {
|
||||
$abo = new UserAbo([
|
||||
'is_for' => 'ot',
|
||||
'member_id' => 454,
|
||||
'user_id' => null,
|
||||
]);
|
||||
|
||||
expect(IncentiveTracker::consultantUserIdForAboIncentive($abo))->toBe(454);
|
||||
});
|
||||
|
||||
it('nutzt user_id als Berater bei Eigenabo me', function () {
|
||||
$abo = new UserAbo([
|
||||
'is_for' => 'me',
|
||||
'user_id' => 200,
|
||||
'member_id' => null,
|
||||
]);
|
||||
|
||||
expect(IncentiveTracker::consultantUserIdForAboIncentive($abo))->toBe(200);
|
||||
});
|
||||
|
||||
it('liefert null wenn ot ohne member_id', function () {
|
||||
$abo = new UserAbo([
|
||||
'is_for' => 'ot',
|
||||
'member_id' => null,
|
||||
'user_id' => null,
|
||||
]);
|
||||
|
||||
expect(IncentiveTracker::consultantUserIdForAboIncentive($abo))->toBeNull();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue