mirror of
https://github.com/gofiber/storage.git
synced 2025-09-28 05:12:19 +08:00
🐛 Fix bug preventing non-utf8 characters being saved in some databases (#87)
This commit is contained in:
@@ -148,6 +148,17 @@ func Test_Postgres_GC(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func Test_Postgres_Non_UTF8(t *testing.T) {
|
||||
val := []byte("0xF5")
|
||||
|
||||
err := testStore.Set("0xF6", val, 0)
|
||||
utils.AssertEqual(t, nil, err)
|
||||
|
||||
result, err := testStore.Get("0xF6")
|
||||
utils.AssertEqual(t, nil, err)
|
||||
utils.AssertEqual(t, val, result)
|
||||
}
|
||||
|
||||
func Test_Postgres_Close(t *testing.T) {
|
||||
utils.AssertEqual(t, nil, testStore.Close())
|
||||
}
|
||||
|
Reference in New Issue
Block a user