From: Mark Felder Date: Fri, 4 Dec 2020 18:07:23 +0000 (-0600) Subject: Answer new prompt interactively X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=657002e738adc5755ad2389b99cacd66f40c3715;p=akkoma Answer new prompt interactively --- diff --git a/test/mix/tasks/pleroma/user_test.exs b/test/mix/tasks/pleroma/user_test.exs index ce819f815..ae0c50443 100644 --- a/test/mix/tasks/pleroma/user_test.exs +++ b/test/mix/tasks/pleroma/user_test.exs @@ -36,7 +36,7 @@ defmodule Mix.Tasks.Pleroma.UserTest do unsaved = build(:user) # prepare to answer yes - send(self(), {:mix_shell_input, :yes?, true}) + send(self(), {:mix_shell_input, :prompt, "Y"}) Mix.Tasks.Pleroma.User.run([ "new", @@ -55,7 +55,7 @@ defmodule Mix.Tasks.Pleroma.UserTest do assert_received {:mix_shell, :info, [message]} assert message =~ "user will be created" - assert_received {:mix_shell, :yes?, [message]} + assert_received {:mix_shell, :prompt, [message]} assert message =~ "Continue" assert_received {:mix_shell, :info, [message]} @@ -73,14 +73,14 @@ defmodule Mix.Tasks.Pleroma.UserTest do unsaved = build(:user) # prepare to answer no - send(self(), {:mix_shell_input, :yes?, false}) + send(self(), {:mix_shell_input, :prompt, "N"}) Mix.Tasks.Pleroma.User.run(["new", unsaved.nickname, unsaved.email]) assert_received {:mix_shell, :info, [message]} assert message =~ "user will be created" - assert_received {:mix_shell, :yes?, [message]} + assert_received {:mix_shell, :prompt, [message]} assert message =~ "Continue" assert_received {:mix_shell, :info, [message]}