Implement commercial calendars: booking_open, specialists, expire without type downgrade.
CI / test (push) Successful in 6m44s
CI / deploy-ift (push) Successful in 4m2s
CI / e2e-ift (push) Successful in 1m25s
CI / deploy-stage (push) Successful in 2m25s
CI / e2e-stage (push) Successful in 1m12s

Refs EventHub/EventHubBack#54
This commit is contained in:
2026-07-22 16:12:52 +03:00
parent fdb08eb453
commit af5f506866
35 changed files with 978 additions and 207 deletions
+10 -5
View File
@@ -40,22 +40,27 @@ test() ->
% Создаём тестовые данные для ненулевой статистики
UserToken = api_test_runner:get_user_token(),
CalId = api_test_runner:create_calendar(UserToken, #{title => <<"StatsCal">>}),
ParticipantEmail = api_test_runner:unique_email(<<"statspart">>),
ParticipantToken = api_test_runner:register_and_login(ParticipantEmail, <<"pass">>),
CalId = api_test_runner:create_calendar(UserToken, #{
title => <<"StatsCal">>,
type => <<"commercial">>,
confirmation => <<"manual">>}),
EventId = api_test_runner:create_event(UserToken, CalId, #{
title => <<"Stats Event">>,
start_time => api_test_runner:future_date(),
duration => 60
}),
% Бронируем и подтверждаем, чтобы можно было оставить отзыв
% Бронируем участником (не владельцем) и подтверждаем, чтобы можно было оставить отзыв
#{<<"id">> := BookingId} = api_test_runner:client_post(
<<"/v1/events/", EventId/binary, "/bookings">>, UserToken, #{}),
<<"/v1/events/", EventId/binary, "/bookings">>, ParticipantToken, #{}),
api_test_runner:client_put(<<"/v1/bookings/", BookingId/binary>>, UserToken,
#{action => <<"confirm">>}),
% Оставляем отзыв
api_test_runner:client_post(<<"/v1/reviews">>, UserToken,
api_test_runner:client_post(<<"/v1/reviews">>, ParticipantToken,
#{target_type => <<"event">>, target_id => EventId, rating => 5, comment => <<"Great!">>}),
% Жалоба
api_test_runner:client_post(<<"/v1/reports">>, UserToken,
api_test_runner:client_post(<<"/v1/reports">>, ParticipantToken,
#{<<"target_type">> => <<"event">>, <<"target_id">> => EventId, <<"reason">> => <<"Test">>}),
% Подписка
SubUserToken = api_test_runner:get_user_token(),