Skip to content

Commit

Permalink
VIP - fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
shahryarjb committed May 26, 2024
1 parent bed37d6 commit a4316a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/plugins_management/hook.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/plugins_management/event_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a4316a6

Please sign in to comment.