feature/proxied registration (#26)

* chore: ignore mprocs configuration files

* feat(macaroon): add macaroon module

* chore: update module dependencies
This commit is contained in:
Prad Nukala
2024-09-26 18:01:49 -04:00
committed by GitHub
parent 5ef00c3910
commit 779a45121b
80 changed files with 15909 additions and 64 deletions
+31
View File
@@ -0,0 +1,31 @@
package keeper_test
import (
"testing"
apiv1 "github.com/onsonr/sonr/api/macaroon/v1"
"github.com/stretchr/testify/require"
)
func TestORM(t *testing.T) {
f := SetupTest(t)
dt := f.k.OrmDB.ExampleDataTable()
acc := []byte("test_acc")
amt := uint64(7)
err := dt.Insert(f.ctx, &apiv1.ExampleData{
Account: acc,
Amount: amt,
})
require.NoError(t, err)
d, err := dt.Has(f.ctx, []byte("test_acc"))
require.NoError(t, err)
require.True(t, d)
res, err := dt.Get(f.ctx, []byte("test_acc"))
require.NoError(t, err)
require.NotNil(t, res)
require.EqualValues(t, amt, res.Amount)
}