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

Function TestUploaderUploadAndAttachNoAssets

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

Source from the content-addressed store, hash-verified

249}
250
251func TestUploaderUploadAndAttachNoAssets(t *testing.T) {
252 reg := &httpmock.Registry{}
253 defer reg.Verify(t)
254
255 body, uploaded, err := testUploader(reg).UploadAndAttach(context.Background(), "unchanged\n", nil)
256
257 require.NoError(t, err)
258 assert.Zero(t, uploaded)
259 assert.Equal(t, "unchanged\n", body)
260 assert.Empty(t, reg.Requests)
261}
262
263func TestAppendParagraph(t *testing.T) {
264 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