Skip to content

Commit dff7eba

Browse files
committed
wip
1 parent 3e29889 commit dff7eba

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
defmodule LiveDebugger.GenServers.StateServerTest do
2+
use ExUnit.Case, async: true
3+
4+
import Mox
5+
6+
alias LiveDebugger.Utils.PubSub, as: PubSubUtils
7+
alias LiveDebugger.GenServers.StateServer
8+
alias LiveDebugger.MockStateServer
9+
10+
setup :verify_on_exit!
11+
12+
test "start_link/1" do
13+
assert {:ok, _pid} = StateServer.start_link()
14+
GenServer.stop(StateServer)
15+
end
16+
17+
test "init/1" do
18+
assert {:ok, []} = StateServer.init([])
19+
end
20+
21+
test "record_id/1" do
22+
pid = self()
23+
assert StateServer.record_id(pid) == "#{inspect(pid)}"
24+
end
25+
26+
describe "handle_info/2" do
27+
test "handles new trace and updates state" do
28+
MockStateServer
29+
end
30+
end
31+
end

0 commit comments

Comments
 (0)