fix: persist specialist_id on event create; 402 commercial without active sub. Fixes EventHub/EventHubBack#61
CI / test (push) Failing after 6m52s
CI / deploy-ift (push) Has been skipped
CI / e2e-ift (push) Has been skipped
CI / deploy-stage (push) Has been skipped
CI / e2e-stage (push) Has been skipped

This commit is contained in:
2026-07-27 21:17:15 +03:00
parent edb7c20f70
commit 81728301e2
9 changed files with 115 additions and 54 deletions
+3 -3
View File
@@ -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(),