MCPcopy Create free account
hub / github.com/git-bug/git-bug / TestPublicKeyJSON

Function TestPublicKeyJSON

entities/identity/key_test.go:13–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestPublicKeyJSON(t *testing.T) {
14 k := generatePublicKey()
15
16 dataJSON, err := json.Marshal(k)
17 require.NoError(t, err)
18
19 var read Key
20 err = json.Unmarshal(dataJSON, &read)
21 require.NoError(t, err)
22
23 require.Equal(t, k, &read)
24}
25
26func TestStoreLoad(t *testing.T) {
27 repo := repository.NewMockRepoKeyring()

Callers

nothing calls this directly

Calls 1

generatePublicKeyFunction · 0.85

Tested by

no test coverage detected