summaryrefslogtreecommitdiff
path: root/internal/cli/stop/command_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/stop/command_test.go')
-rw-r--r--internal/cli/stop/command_test.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/internal/cli/stop/command_test.go b/internal/cli/stop/command_test.go
new file mode 100644
index 00000000..8bbb29ea
--- /dev/null
+++ b/internal/cli/stop/command_test.go
@@ -0,0 +1,27 @@
+package stop_test
+
+import (
+ "testing"
+
+ "github.com/roadrunner-server/roadrunner/v2/internal/cli/stop"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestCommandProperties(t *testing.T) {
+ cmd := stop.NewCommand(toPtr(false))
+
+ assert.Equal(t, "stop", cmd.Use)
+ assert.NotNil(t, cmd.RunE)
+}
+
+func TestCommandTrue(t *testing.T) {
+ cmd := stop.NewCommand(toPtr(true))
+
+ assert.Equal(t, "stop", cmd.Use)
+ assert.NotNil(t, cmd.RunE)
+}
+
+func toPtr[T any](val T) *T {
+ return &val
+}