This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / knotserver / xrpc / git_keep_commit_test.go
547 B 17 lines
1package xrpc 2 3import ( 4 "fmt" 5 "testing" 6 7 "github.com/alecthomas/assert/v2" 8 "github.com/bluesky-social/indigo/atproto/syntax" 9) 10 11func TestEscapeGitRef(t *testing.T) { 12 recordDID := syntax.DID("did:plc:alice") 13 record := syntax.ATURI("at://did:plc:alice/sh.tangled.repo.pull/something") 14 commitID := "what" 15 refName := EscapeGitRef(fmt.Sprintf("refs/tngl/keep/%s/%s/%s/%s", recordDID.String(), record.Collection(), record.RecordKey(), commitID)) 16 assert.Equal(t, "refs/tngl/keep/did%3aplc%3aalice/sh.tangled.repo.pull/something/what", refName) 17}