diff --git a/test/api/users/user_automod_tests.erl b/test/api/users/user_automod_tests.erl old mode 100644 new mode 100755 index 769524e..106d314 --- a/test/api/users/user_automod_tests.erl +++ b/test/api/users/user_automod_tests.erl @@ -92,7 +92,16 @@ test_report_on_review(Admin) -> }), Owner = api_test_runner:get_user_token(), CalId = api_test_runner:create_calendar(Owner, #{title => <<"RevRepCal">>}), + #{<<"id">> := EventId} = api_test_runner:client_post( + <<"/v1/calendars/", CalId/binary, "/events">>, Owner, + #{title => <<"Event for review report">>, + start_time => api_test_runner:future_date_iso8601(), + duration => 60}), Reviewer = api_test_runner:get_user_token(), + #{<<"id">> := BookingId} = api_test_runner:client_post( + <<"/v1/events/", EventId/binary, "/bookings">>, Reviewer, #{}), + api_test_runner:client_put(<<"/v1/bookings/", BookingId/binary>>, Owner, + #{action => <<"confirm">>}), {ok, 201, _, RevBody} = api_test_runner:client_request(post, <<"/v1/reviews">>, Reviewer, jsx:encode(#{ target_type => <<"calendar">>,