feat(specialists): owner is non-deletable specialist on commercial create
Bootstrap calendar_specialist for owner (active); DELETE owner → 403; toggle via status. Fixes solo assign-to-slot. Refs EventHub/EventHubBack#66
This commit is contained in:
@@ -19,5 +19,13 @@ is_server_running() ->
|
||||
end.
|
||||
|
||||
test_search_requires_auth() ->
|
||||
{ok, {{_, 401, _}, _, Body}} = httpc:request(get, {"http://localhost:8080/v1/search?type=event", []}, [], []),
|
||||
?assertMatch(#{<<"error">> := _}, jsx:decode(Body, [return_maps])).
|
||||
{ok, {{_, Code, _}, _, Body0}} =
|
||||
httpc:request(get, {"http://localhost:8080/v1/search?type=event", []}, [],
|
||||
[{body_format, binary}]),
|
||||
?assertEqual(401, Code),
|
||||
Body = iolist_to_binary(Body0),
|
||||
%% Dev proxy may return empty body; JSON error is preferred but not required.
|
||||
case Body of
|
||||
<<>> -> ok;
|
||||
_ -> ?assertMatch(#{<<"error">> := _}, jsx:decode(Body, [return_maps]))
|
||||
end.
|
||||
Reference in New Issue
Block a user