Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit788cc18

Browse files
committed
feat(cli): add test for delete command
This adds a test for the `delete` command when it's called without anyarguments to ensure is returns the custom error message.
1 parentde2f33c commit788cc18

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎cli/delete_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package cli_test
2+
3+
import (
4+
"testing"
5+
6+
"github.com/stretchr/testify/require"
7+
8+
"github.com/coder/coder/cli"
9+
"github.com/coder/coder/cli/clitest"
10+
)
11+
12+
funcTestDelete(t*testing.T) {
13+
t.Run("WithoutParameters",func(t*testing.T) {
14+
t.Parallel()
15+
16+
cmd,_:=clitest.New(t,"delete")
17+
18+
err:=cmd.Execute()
19+
require.ErrorContains(t,err,cli.DeleteError)
20+
})
21+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp