fix(test): archived month returns 409 before event_in_past.
CI / test (push) Successful in 36m6s
CI / deploy-ift (push) Successful in 2m44s
CI / e2e-ift (push) Successful in 1m19s
CI / deploy-stage (push) Successful in 2m34s
CI / e2e-stage (push) Successful in 4m14s

Refs EventHub/EventHubBack#76

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-17 16:25:51 +03:00
parent e3f5a7ca13
commit 501334e241
+6 -2
View File
@@ -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)).