Skip to content

Commit

Permalink
add tests to check for owner key in DID Web Create
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Jul 14, 2023
1 parent a3964cc commit 87fd44a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions did/web/web_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ func TestDIDWebCreateDoc(t *testing.T) {
doc, err := didWebBasic.CreateDoc(crypto.Ed25519, pk)
assert.NoError(tt, err)
assert.Equal(tt, string(didWebBasic), doc.ID)
tt.Run("Validate Owner Verification Method", func(t *testing.T) {
assert.Equal(t, len(doc.VerificationMethod), 1)
ownerMethod := doc.VerificationMethod[0]
assert.Contains(t, ownerMethod.ID, "owner")
assert.Equal(t, ownerMethod.Controller, doc.ID)
})
})

t.Run("Unsupported Key Type", func(tt *testing.T) {
Expand Down

0 comments on commit 87fd44a

Please sign in to comment.