(t *testing.T)
| 65 | } |
| 66 | |
| 67 | func TestOwnerBinaryExtension(t *testing.T) { |
| 68 | tempDir := t.TempDir() |
| 69 | extName := "gh-bin-ext" |
| 70 | extDir := filepath.Join(tempDir, "extensions", extName) |
| 71 | extPath := filepath.Join(extDir, extName) |
| 72 | bm := binManifest{ |
| 73 | Owner: "owner", |
| 74 | Name: "gh-bin-ext", |
| 75 | Host: "example.com", |
| 76 | Tag: "v1.0.1", |
| 77 | } |
| 78 | assert.NoError(t, stubBinaryExtension(extDir, bm)) |
| 79 | e := &Extension{ |
| 80 | kind: BinaryKind, |
| 81 | path: extPath, |
| 82 | } |
| 83 | |
| 84 | assert.Equal(t, "owner", e.Owner()) |
| 85 | } |
| 86 | |
| 87 | func TestOwnerGitExtension(t *testing.T) { |
| 88 | gc := &mockGitClient{} |
nothing calls this directly
no test coverage detected