Show a dynamically updated list of NTS servers #1
|
@ -38,6 +38,23 @@ defmodule Chronoscope.NTS.ClientTest do
|
|||
assert Client.handle_call(:list, nil, %{state: true}) == {:reply, %{state: true}, %{state: true}}
|
||||
end
|
||||
|
||||
test ":auto_refresh" do
|
||||
assert {:reply, :ok, %{server: true, timer: _timer}} = Client.handle_call(:auto_refresh, nil, %{server: true})
|
||||
end
|
||||
|
||||
test ":auto_refresh - already activated" do
|
||||
assert Client.handle_call(:auto_refresh, nil, %{server: true, timer: true}) ==
|
||||
{:reply, :already_started, %{server: true, timer: true}}
|
||||
end
|
||||
|
||||
test ":cancel_auto_refresh" do
|
||||
assert Client.handle_call(:cancel_auto_refresh, nil, %{server: true, timer: true}) == {:reply, :ok, %{server: true}}
|
||||
end
|
||||
|
||||
test ":cancel_auto_refresh - already cancelled" do
|
||||
assert Client.handle_call(:cancel_auto_refresh, nil, %{server: true}) == {:reply, :already_cancelled, %{server: true}}
|
||||
end
|
||||
|
||||
test ":key_establishment - cached" do
|
||||
assert Client.handle_call(:key_establishment, nil, %{
|
||||
server: %{host: "localhost", port: 3333},
|
||||
|
|
Loading…
Reference in New Issue