Add test for release view json export fields
This commit is contained in:
parent
a4da98d49a
commit
13dea3e35d
1 changed files with 22 additions and 0 deletions
|
|
@ -14,11 +14,33 @@ import (
|
|||
"github.com/cli/cli/v2/pkg/cmdutil"
|
||||
"github.com/cli/cli/v2/pkg/httpmock"
|
||||
"github.com/cli/cli/v2/pkg/iostreams"
|
||||
"github.com/cli/cli/v2/pkg/jsonfieldstest"
|
||||
"github.com/google/shlex"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestJSONFields(t *testing.T) {
|
||||
jsonfieldstest.ExpectCommandToSupportJSONFields(t, NewCmdView, []string{
|
||||
"apiUrl",
|
||||
"author",
|
||||
"assets",
|
||||
"body",
|
||||
"createdAt",
|
||||
"id",
|
||||
"isDraft",
|
||||
"isPrerelease",
|
||||
"name",
|
||||
"publishedAt",
|
||||
"tagName",
|
||||
"tarballUrl",
|
||||
"targetCommitish",
|
||||
"uploadUrl",
|
||||
"url",
|
||||
"zipballUrl",
|
||||
})
|
||||
}
|
||||
|
||||
func Test_NewCmdView(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue