diff --git a/lib/plugins_management/hook.ex b/lib/plugins_management/hook.ex index c64dbd6..e712285 100644 --- a/lib/plugins_management/hook.ex +++ b/lib/plugins_management/hook.ex @@ -63,9 +63,6 @@ defmodule MishkaInstaller.PluginsManagement.Hook do end end - # TODO: Subscribe and if there is a deps that we need, it should start if held - # TODO: Subscribe and if there is a deps that we need, it should held the other - # |__ like deleted lib def start_link(args \\ []) do GenServer.start_link(@plugin_name, args, name: @plugin_name) end @@ -125,6 +122,9 @@ defmodule MishkaInstaller.PluginsManagement.Hook do {:noreply, new_state} end + # TODO: Subscribe and if there is a deps that we need, it should start if held + # TODO: Subscribe and if there is a deps that we need, it should held the other + # |__ like deleted lib def handle_info(%{status: status, data: data}, state) when status in [:started, :stopped] do event = Keyword.get(state, :event) diff --git a/test/plugins_management/event_test.exs b/test/plugins_management/event_test.exs index 9649d45..1b83211 100644 --- a/test/plugins_management/event_test.exs +++ b/test/plugins_management/event_test.exs @@ -158,7 +158,7 @@ defmodule MishkaInstallerTest.PluginsManagement.EventTest do MishkaInstaller.subscribe("event") _manual_starting = RegisterEmailSender.start_link() - assert_receive %{status: :start, data: _data}, 1000 + assert_receive %{status: :start, data: _data}, 3000 {:ok, :unregister, _data} = assert Event.unregister(RegisterEmailSender, "after_success_login", true)