MCPcopy
hub / github.com/cli/cli / Test_guessGistName_userFiles

Function Test_guessGistName_userFiles

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

guessGistNameFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected