MCPcopy Index your code
hub / github.com/git-bug/git-bug / TestMetadata

Function TestMetadata

entities/bug/operation_test.go:79–92  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestMetadata(t *testing.T) {
80 repo := repository.NewMockRepoClock()
81
82 rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
83 require.NoError(t, err)
84
85 op := NewCreateOp(rene, time.Now().Unix(), "title", "message", nil)
86
87 op.SetMetadata("key", "value")
88
89 val, ok := op.GetMetadata("key")
90 require.True(t, ok)
91 require.Equal(t, val, "value")
92}
93
94func TestID(t *testing.T) {
95 repo := repository.CreateGoGitTestRepo(t, false)

Callers

nothing calls this directly

Calls 5

NewMockRepoClockFunction · 0.92
NewIdentityFunction · 0.92
NewCreateOpFunction · 0.85
SetMetadataMethod · 0.65
GetMetadataMethod · 0.65

Tested by

no test coverage detected