MCPcopy
hub / github.com/cli/cli / TestIsPinnedBinaryExtensionPinned

Function TestIsPinnedBinaryExtensionPinned

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

Source from the content-addressed store, hash-verified

121}
122
123func TestIsPinnedBinaryExtensionPinned(t *testing.T) {
124 tempDir := t.TempDir()
125 extName := "gh-bin-ext"
126 extDir := filepath.Join(tempDir, "extensions", extName)
127 extPath := filepath.Join(extDir, extName)
128 bm := binManifest{
129 Name: "gh-bin-ext",
130 IsPinned: true,
131 }
132 assert.NoError(t, stubBinaryExtension(extDir, bm))
133 e := &Extension{
134 kind: BinaryKind,
135 path: extPath,
136 }
137
138 assert.True(t, e.IsPinned())
139}
140
141func TestIsPinnedGitExtensionUnpinned(t *testing.T) {
142 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