MCPcopy Create free account
hub / github.com/cli/cli / Test_guessGistName_userFiles

Function Test_guessGistName_userFiles

pkg/cmd/gist/create/create_test.go:48–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

46}
47
48func Test_guessGistName_userFiles(t *testing.T) {
49 files := map[string]*shared.GistFile{
50 "fig.txt": {Content: "I am a fig"},
51 "apple.txt": {Content: "I am an apple"},
52 "gistfile0.txt": {Content: "sample content"},
53 }
54
55 gistName := guessGistName(files)
56 assert.Equal(t, "apple.txt", gistName)
57}
58
59func TestNewCmdCreate(t *testing.T) {
60 tests := []struct {

Callers

nothing calls this directly

Calls 2

guessGistNameFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected