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

Function TestUploaderUploadAndAttachNoAssets

internal/attachments/attach_test.go:250–260  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

248}
249
250func TestUploaderUploadAndAttachNoAssets(t *testing.T) {
251 reg := &httpmock.Registry{}
252 defer reg.Verify(t)
253
254 body, uploaded, err := testUploader(reg).UploadAndAttach(context.Background(), "unchanged\n", nil)
255
256 require.NoError(t, err)
257 assert.Zero(t, uploaded)
258 assert.Equal(t, "unchanged\n", body)
259 assert.Empty(t, reg.Requests)
260}
261
262func TestAppendParagraph(t *testing.T) {
263 tests := []struct {

Callers

nothing calls this directly

Calls 5

VerifyMethod · 0.95
testUploaderFunction · 0.85
UploadAndAttachMethod · 0.80
EqualMethod · 0.80
EmptyMethod · 0.80

Tested by

no test coverage detected