fix: automod CT seeds confirmed booking before calendar review. Refs EventHub/EventHubFront#8
This commit is contained in:
Regular → Executable
+9
@@ -92,7 +92,16 @@ test_report_on_review(Admin) ->
|
|||||||
}),
|
}),
|
||||||
Owner = api_test_runner:get_user_token(),
|
Owner = api_test_runner:get_user_token(),
|
||||||
CalId = api_test_runner:create_calendar(Owner, #{title => <<"RevRepCal">>}),
|
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(),
|
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,
|
{ok, 201, _, RevBody} = api_test_runner:client_request(post, <<"/v1/reviews">>, Reviewer,
|
||||||
jsx:encode(#{
|
jsx:encode(#{
|
||||||
target_type => <<"calendar">>,
|
target_type => <<"calendar">>,
|
||||||
|
|||||||
Reference in New Issue
Block a user