MCPcopy Create free account
hub / github.com/libgit2/git2go / TestCreateNote

Function TestCreateNote

note_test.go:10–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestCreateNote(t *testing.T) {
11 t.Parallel()
12 repo := createTestRepo(t)
13 defer cleanupTestRepo(t, repo)
14
15 commitId, _ := seedTestRepo(t, repo)
16
17 commit, err := repo.LookupCommit(commitId)
18 checkFatal(t, err)
19
20 note, noteId := createTestNote(t, repo, commit)
21
22 compareStrings(t, "I am a note\n", note.Message())
23 compareStrings(t, noteId.String(), note.Id().String())
24 compareStrings(t, "alice", note.Author().Name)
25 compareStrings(t, "alice@example.com", note.Author().Email)
26 compareStrings(t, "alice", note.Committer().Name)
27 compareStrings(t, "alice@example.com", note.Committer().Email)
28}
29
30func TestNoteIterator(t *testing.T) {
31 t.Parallel()

Callers

nothing calls this directly

Calls 12

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
seedTestRepoFunction · 0.85
checkFatalFunction · 0.85
createTestNoteFunction · 0.85
compareStringsFunction · 0.85
LookupCommitMethod · 0.80
MessageMethod · 0.45
StringMethod · 0.45
IdMethod · 0.45
AuthorMethod · 0.45
CommitterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…