fix: persist specialist_id on event create; 402 commercial without active sub. Fixes EventHub/EventHubBack#61
This commit is contained in:
@@ -18,7 +18,7 @@ logic_subscription_test_() ->
|
||||
{"Check subscription - free", fun test_check_free/0},
|
||||
{"Check subscription - trial", fun test_check_trial/0},
|
||||
{"Check subscription - paid", fun test_check_paid/0},
|
||||
{"Can create commercial - free (auto-trial)", fun test_can_create_commercial_free/0},
|
||||
{"Can create commercial - free (no auto-trial)", fun test_can_create_commercial_free/0},
|
||||
{"Can create commercial - trial", fun test_can_create_commercial_trial/0},
|
||||
{"Can create commercial - paid", fun test_can_create_commercial_paid/0},
|
||||
{"Get user subscription - free", fun test_get_user_subscription_free/0},
|
||||
@@ -127,9 +127,9 @@ test_check_paid() ->
|
||||
{ok, active, monthly} = logic_subscription:check_user_subscription(UserId).
|
||||
|
||||
test_can_create_commercial_free() ->
|
||||
% Новый пользователь автоматически получает пробный период при проверке
|
||||
% Без активной подписки/trial create commercial запрещён (trial — явно через start_trial)
|
||||
UserId = create_test_user(),
|
||||
?assert(logic_subscription:can_create_commercial_calendar(UserId)).
|
||||
?assertNot(logic_subscription:can_create_commercial_calendar(UserId)).
|
||||
|
||||
test_can_create_commercial_trial() ->
|
||||
UserId = create_test_user(),
|
||||
|
||||
Reference in New Issue
Block a user