Stage 3.4

This commit is contained in:
2026-04-20 16:40:44 +03:00
parent 42a047a938
commit b24cbc97f3
25 changed files with 2520 additions and 123 deletions

View File

@@ -51,7 +51,7 @@ create_test_user_and_calendar() ->
},
mnesia:dirty_write(User),
{ok, Calendar} = logic_calendar:create_calendar(UserId, <<"Test Calendar">>, <<"">>),
{ok, Calendar} = logic_calendar:create_calendar(UserId, <<"Test Calendar">>, <<"">>, manual),
{UserId, Calendar#calendar.id}.
test_create_event() ->
@@ -99,10 +99,8 @@ test_delete_event() ->
test_time_validation() ->
{UserId, CalendarId} = create_test_user_and_calendar(),
% Событие в прошлом
PastTime = {{2020, 1, 1}, {10, 0, 0}},
{error, event_in_past} = logic_event:create_event(UserId, CalendarId, <<"Past">>, PastTime, 60),
% Событие в будущем
FutureTime = {{2030, 1, 1}, {10, 0, 0}},
?assertEqual(ok, logic_event:validate_event_time(FutureTime)).