Show a dynamically updated list of NTS servers #1

Merged
mike merged 21 commits from liveview into main 2024-07-26 09:35:19 -04:00
1 changed files with 17 additions and 0 deletions
Showing only changes of commit 79340221eb - Show all commits

View File

@ -38,6 +38,23 @@ defmodule Chronoscope.NTS.ClientTest do
assert Client.handle_call(:list, nil, %{state: true}) == {:reply, %{state: true}, %{state: true}} assert Client.handle_call(:list, nil, %{state: true}) == {:reply, %{state: true}, %{state: true}}
end 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 test ":key_establishment - cached" do
assert Client.handle_call(:key_establishment, nil, %{ assert Client.handle_call(:key_establishment, nil, %{
server: %{host: "localhost", port: 3333}, server: %{host: "localhost", port: 3333},