Implement commercial calendars: booking_open, specialists, expire without type downgrade.
Refs EventHub/EventHubBack#54
This commit is contained in:
@@ -91,7 +91,8 @@ test_report_on_review(Admin) ->
|
||||
<<"report_threshold">> => 3
|
||||
}),
|
||||
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">>, type => <<"commercial">>, confirmation => <<"manual">>}),
|
||||
#{<<"id">> := EventId} = api_test_runner:client_post(
|
||||
<<"/v1/calendars/", CalId/binary, "/events">>, Owner,
|
||||
#{title => <<"Event for review report">>,
|
||||
|
||||
Regular → Executable
+5
-1
@@ -31,7 +31,11 @@ test() ->
|
||||
ParticipantToken = api_test_runner:register_and_login(ParticipantEmail, <<"pass">>),
|
||||
|
||||
% Создаём календарь и событие
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{title => <<"BookingTest">>}),
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{
|
||||
title => <<"BookingTest">>,
|
||||
type => <<"commercial">>,
|
||||
confirmation => <<"manual">>
|
||||
}),
|
||||
#{<<"id">> := EventId} = api_test_runner:client_post(
|
||||
<<"/v1/calendars/", CalId/binary, "/events">>, OwnerToken,
|
||||
#{title => <<"Event to book">>,
|
||||
|
||||
Regular → Executable
+5
-1
@@ -27,7 +27,11 @@ test() ->
|
||||
ParticipantToken = api_test_runner:register_and_login(ParticipantEmail, <<"pass">>),
|
||||
|
||||
% Создаём календарь и событие
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{title => <<"MyBookTest">>}),
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{
|
||||
title => <<"MyBookTest">>,
|
||||
type => <<"commercial">>,
|
||||
confirmation => <<"manual">>
|
||||
}),
|
||||
#{<<"id">> := EventId} = api_test_runner:client_post(
|
||||
<<"/v1/calendars/", CalId/binary, "/events">>, OwnerToken,
|
||||
#{title => <<"Event for my booking">>,
|
||||
|
||||
Regular → Executable
+2
-1
@@ -27,7 +27,8 @@ test() ->
|
||||
ParticipantToken = api_test_runner:register_and_login(ParticipantEmail, <<"pass">>),
|
||||
|
||||
% Создаём календарь и событие
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{title => <<"MyRevTest">>}),
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{
|
||||
title => <<"MyRevTest">>, type => <<"commercial">>, confirmation => <<"manual">>}),
|
||||
#{<<"id">> := EventId} = api_test_runner:client_post(
|
||||
<<"/v1/calendars/", CalId/binary, "/events">>, OwnerToken,
|
||||
#{title => <<"Event for my review">>,
|
||||
|
||||
Regular → Executable
+2
-1
@@ -34,7 +34,8 @@ test() ->
|
||||
StrangerToken = api_test_runner:register_and_login(StrangerEmail, <<"pass">>),
|
||||
|
||||
% Создаём календарь, событие, бронирование и отзыв
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{title => <<"RevById">>}),
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{
|
||||
title => <<"RevById">>, type => <<"commercial">>, confirmation => <<"manual">>}),
|
||||
#{<<"id">> := EventId} = api_test_runner:client_post(
|
||||
<<"/v1/calendars/", CalId/binary, "/events">>, OwnerToken,
|
||||
#{title => <<"Event for review">>,
|
||||
|
||||
Regular → Executable
+2
-1
@@ -22,7 +22,8 @@ test() ->
|
||||
OtherEmail = api_test_runner:unique_email(<<"rvother">>),
|
||||
OtherToken = api_test_runner:register_and_login(OtherEmail, <<"pass">>),
|
||||
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{title => <<"VoteCal">>}),
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{
|
||||
title => <<"VoteCal">>, type => <<"commercial">>, confirmation => <<"manual">>}),
|
||||
#{<<"id">> := EventId} = api_test_runner:client_post(
|
||||
<<"/v1/calendars/", CalId/binary, "/events">>, OwnerToken,
|
||||
#{title => <<"Event for votes">>,
|
||||
|
||||
Regular → Executable
+5
-1
@@ -31,7 +31,11 @@ test() ->
|
||||
StrangerToken = api_test_runner:register_and_login(StrangerEmail, <<"pass">>),
|
||||
|
||||
% Создаём календарь и событие
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{title => <<"ReviewTest">>}),
|
||||
CalId = api_test_runner:create_calendar(OwnerToken, #{
|
||||
title => <<"ReviewTest">>,
|
||||
type => <<"commercial">>,
|
||||
confirmation => <<"manual">>
|
||||
}),
|
||||
#{<<"id">> := EventId} = api_test_runner:client_post(
|
||||
<<"/v1/calendars/", CalId/binary, "/events">>, OwnerToken,
|
||||
#{title => <<"Event for review">>,
|
||||
|
||||
Reference in New Issue
Block a user