TEST (40.1%): command() runs RPCs
parent
b5cad63a55
commit
b36044662a
|
@ -6,12 +6,18 @@ defmodule FarmbotFirmware.CommandTest do
|
|||
import ExUnit.CaptureLog
|
||||
@subject FarmbotFirmware.Command
|
||||
|
||||
@tag :this_is_the_bug
|
||||
test "command() runs RPCs" do
|
||||
arg = [transport: FarmbotFirmware.StubTransport]
|
||||
{:ok, pid} = FarmbotFirmware.start_link(arg, [])
|
||||
send(pid, :timeout)
|
||||
{:error, message} = @subject.command(pid, {:a, {:b, :c}})
|
||||
assert "Can't send command when in :boot state" == message
|
||||
|
||||
assert {:error, :emergency_lock} ==
|
||||
@subject.command(pid, {:command_emergency_lock, []})
|
||||
|
||||
assert :ok == @subject.command(pid, {:command_emergency_unlock, []})
|
||||
cmd = {:parameter_write, [movement_stop_at_home_x: 0.0]}
|
||||
assert :ok == @subject.command(pid, cmd)
|
||||
end
|
||||
|
||||
test "command() refuses to run RPCs in :boot state" do
|
||||
|
|
Loading…
Reference in New Issue