Fix ProfileWatcherTest: handle FileSystem not loaded in test env
This commit is contained in:
parent
bdf22cd411
commit
00b0ed2f5d
1 changed files with 6 additions and 1 deletions
|
|
@ -81,7 +81,12 @@ defmodule Towerops.Profiles.ProfileWatcherTest do
|
|||
describe "GenServer init/handle_info" do
|
||||
test "init/1 returns :ok with a state map" do
|
||||
assert {:ok, state} = ProfileWatcher.init([])
|
||||
assert map_size(state) > 0
|
||||
|
||||
if Code.ensure_loaded?(FileSystem) do
|
||||
assert map_size(state) > 0
|
||||
else
|
||||
assert state == %{}
|
||||
end
|
||||
end
|
||||
|
||||
test "handles :stop file_event without crashing" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue