aboutsummaryrefslogtreecommitdiffstats
path: root/services/agit/agit_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/agit/agit_test.go')
-rw-r--r--services/agit/agit_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/services/agit/agit_test.go b/services/agit/agit_test.go
new file mode 100644
index 0000000000..feaf7dca9b
--- /dev/null
+++ b/services/agit/agit_test.go
@@ -0,0 +1,16 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package agit
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestParseAgitPushOptionValue(t *testing.T) {
+ assert.Equal(t, "a", parseAgitPushOptionValue("a"))
+ assert.Equal(t, "a", parseAgitPushOptionValue("{base64}YQ=="))
+ assert.Equal(t, "{base64}invalid value", parseAgitPushOptionValue("{base64}invalid value"))
+}