feat(identity): created-content footer

This commit is contained in:
Mathias Bergqvist
2026-05-04 21:05:42 +02:00
parent 0b5daca198
commit 3613c36afb
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package identity_test
import (
"testing"
"gitea.d-ma.be/mathias/gitea-mcp/internal/identity"
"github.com/stretchr/testify/assert"
)
func TestApplyFooterAppendsWhenCallerSet(t *testing.T) {
body := identity.ApplyFooter("Initial body.", "mathiasbq")
assert.Contains(t, body, "Initial body.")
assert.Contains(t, body, "_Created via git-mcp on behalf of @mathiasbq_")
}
func TestApplyFooterUnchangedWhenCallerEmpty(t *testing.T) {
body := identity.ApplyFooter("Initial body.", "")
assert.Equal(t, "Initial body.", body)
}