Stage 3.4
This commit is contained in:
@@ -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)).
|
||||
Reference in New Issue
Block a user