fix(test): archived month returns 409 before event_in_past.
Refs EventHub/EventHubBack#76 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -118,8 +118,12 @@ 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),
|
||||
ClosedMonth = {{2020, 1, 1}, {10, 0, 0}},
|
||||
{error, archived} = logic_event:create_event(UserId, CalendarId, <<"Closed">>, ClosedMonth, 60),
|
||||
|
||||
NowSec = calendar:datetime_to_gregorian_seconds(calendar:universal_time()),
|
||||
PastInHot = calendar:gregorian_seconds_to_datetime(NowSec - 3600),
|
||||
{error, event_in_past} = logic_event:create_event(UserId, CalendarId, <<"Past">>, PastInHot, 60),
|
||||
|
||||
FutureTime = eh_test_support:future_start(),
|
||||
?assertEqual(ok, logic_event:validate_event_time(FutureTime)).
|
||||
|
||||
Reference in New Issue
Block a user