重构项目

This commit is contained in:
dragon
2025-05-08 17:36:24 +08:00
parent ddd5d4af5b
commit 9413188aa9
15 changed files with 404 additions and 103 deletions

18
tests/get_meta_test.go Normal file
View File

@@ -0,0 +1,18 @@
package tests
import (
"testing"
"github.com/stretchr/testify/assert"
"gopkg.d7z.net/gitea-pages/tests/core"
)
func Test_get_simple_html(t *testing.T) {
server := core.NewDefaultTestServer()
defer server.Close()
server.AddFile("org1/repo1/gh-pages/index.html", "hello world")
data, _, err := server.OpenFile("https://org1.example.com/repo1/")
assert.NoError(t, err)
assert.Equal(t, "hello world", string(data))
}