diff --git a/examples/gno.land/r/demo/users/gno.mod b/examples/gno.land/r/demo/users/gno.mod index 61b11c09b80..b6f6e640c36 100644 --- a/examples/gno.land/r/demo/users/gno.mod +++ b/examples/gno.land/r/demo/users/gno.mod @@ -4,4 +4,5 @@ require ( gno.land/p/demo/avl v0.0.0-latest gno.land/p/demo/avlhelpers v0.0.0-latest gno.land/p/demo/users v0.0.0-latest + gno.land/p/demo/uassert v0.0.0-latest ) diff --git a/examples/gno.land/r/demo/users/users_test.gno b/examples/gno.land/r/demo/users/users_test.gno new file mode 100644 index 00000000000..cd664867ebc --- /dev/null +++ b/examples/gno.land/r/demo/users/users_test.gno @@ -0,0 +1,14 @@ +package users + +import ( + "testing" + "strconv" + + "gno.land/p/demo/uassert" +) + +func TestPreRegisteredTest1(t *testing.T) { + names := ListUsersByPrefix("test1", 1) + uassert.Equal(t, len(names), 1) + uassert.Equal(t, names[0], "test1") +}