From 41cd93e9866287a421f02a740e557e62170f4378 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Thu, 23 Jul 2020 18:41:12 +0100 Subject: [PATCH] Add command test for no command as error --- pkg/rove/command_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/rove/command_test.go b/pkg/rove/command_test.go index b0f2336..d73b25c 100644 --- a/pkg/rove/command_test.go +++ b/pkg/rove/command_test.go @@ -132,5 +132,10 @@ func TestCommand_Broadcast(t *testing.T) { } func TestCommand_Invalid(t *testing.T) { - // TODO: Test an invalid command + w := NewWorld(8) + name, err := w.SpawnRover() + assert.NoError(t, err) + + err = w.Enqueue(name, &roveapi.Command{Command: roveapi.CommandType_none}) + assert.Error(t, err) }