Current section
Files
Jump to
Current section
Files
src/tests/t_voicemail_noanswer.erl
-module(t_voicemail_noanswer).
-export([main/0]).
% test an agent gets voicemail twice (first one is not answered)
main() ->
Queue = admin:new_queue(#{
recipe => [ #{
conditions => [ [ticks, 1], [type, '=', voice] ],
operations => [ [voicemail, []] ],
runs => run_once,
comment => <<"test">>
}]
}),
test_lib:leave_voicemail(Queue),
Agent = test_lib:available(admin:new_agent()),
[UUID] = agent:wait_for_call(Agent),
call:wait_hangup(UUID),
test_lib:receive_voicemail(Agent).