mirror of
https://github.com/safing/portbase
synced 2025-09-10 15:34:26 +00:00
Finish database queries and subscriptions / Improve Accessor
This commit is contained in:
parent
8c861a1e4f
commit
9ab95b1926
17 changed files with 235 additions and 33 deletions
|
@ -16,10 +16,11 @@ func TestWrapper(t *testing.T) {
|
|||
_ = m
|
||||
|
||||
// create test data
|
||||
testData := []byte(`J{"a": "b"}`)
|
||||
testData := []byte(`{"a": "b"}`)
|
||||
encodedTestData := []byte(`J{"a": "b"}`)
|
||||
|
||||
// test wrapper
|
||||
wrapper, err := NewWrapper("test:a", &Meta{}, testData)
|
||||
wrapper, err := NewWrapper("test:a", &Meta{}, JSON, testData)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@ -34,7 +35,7 @@ func TestWrapper(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !bytes.Equal(testData, encoded) {
|
||||
if !bytes.Equal(encodedTestData, encoded) {
|
||||
t.Error("marshal mismatch")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue