MCPcopy
hub / github.com/cli/cli / TestIsPinnedBinaryExtensionUnpinned

Function TestIsPinnedBinaryExtensionUnpinned

pkg/cmd/extension/extension_test.go:106–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

104}
105
106func TestIsPinnedBinaryExtensionUnpinned(t *testing.T) {
107 tempDir := t.TempDir()
108 extName := "gh-bin-ext"
109 extDir := filepath.Join(tempDir, "extensions", extName)
110 extPath := filepath.Join(extDir, extName)
111 bm := binManifest{
112 Name: "gh-bin-ext",
113 }
114 assert.NoError(t, stubBinaryExtension(extDir, bm))
115 e := &Extension{
116 kind: BinaryKind,
117 path: extPath,
118 }
119
120 assert.False(t, e.IsPinned())
121}
122
123func TestIsPinnedBinaryExtensionPinned(t *testing.T) {
124 tempDir := t.TempDir()

Callers

nothing calls this directly

Calls 3

IsPinnedMethod · 0.95
stubBinaryExtensionFunction · 0.85
JoinMethod · 0.80

Tested by

no test coverage detected