blob: 0e3ae0b6ed274a1eaecbc38baa88fb4a236c6b9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package stop_test
import (
"testing"
"github.com/roadrunner-server/roadrunner/v2024/internal/cli/stop"
"github.com/stretchr/testify/assert"
)
func TestCommandProperties(t *testing.T) {
cmd := stop.NewCommand(toPtr(false), toPtr(false))
assert.Equal(t, "stop", cmd.Use)
assert.NotNil(t, cmd.RunE)
}
func TestCommandTrue(t *testing.T) {
cmd := stop.NewCommand(toPtr(true), toPtr(true))
assert.Equal(t, "stop", cmd.Use)
assert.NotNil(t, cmd.RunE)
}
func toPtr[T any](val T) *T {
return &val
}
|