Files
neo-blog/internal/repo/kv_test.go
Snowykami f501948f91 Refactor site configuration and color scheme management
- Replaced static config with dynamic site info context.
- Updated color scheme handling in various components to use site info.
- Removed deprecated config file and integrated site info fetching.
- Enhanced user preference page to allow color scheme selection.
- Adjusted blog and console components to reflect new site info structure.
- Improved error handling and fallback mechanisms for site info retrieval.
2025-09-26 00:25:34 +08:00

19 lines
361 B
Go

package repo
import "testing"
func TestKvRepo_GetKV(t *testing.T) {
err := KV.SetKV("AAA", map[string]interface{}{"b": 1, "c": "2"})
if err != nil {
t.Fatal(err)
}
v, _ := KV.GetKV("AAA")
t.Log(v)
if v.(map[string]interface{})["b"] != float64(1) {
t.Fatal("b not equal")
}
if v.(map[string]interface{})["c"] != "2" {
t.Fatal("c not equal")
}
}