personal-site/internal/ui/ui_test.go
2026-05-20 16:09:54 +01:00

22 lines
429 B
Go

package ui
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPublicFile(t *testing.T) {
path := "abc.txt"
got := PublicFile(path)
expected := fmt.Sprintf("/%s/%s", "files", path)
assert.Equal(t, expected, got)
}
func TestStaticFile(t *testing.T) {
path := "abc.txt"
got := StaticFile(path)
expected := fmt.Sprintf("/%s/%s?v=%s", "static", path, cacheBuster)
assert.Equal(t, expected, got)
}