z_0_c_filetest.gno
0.55 Kb ยท 29 lines
1// PKGPATH: gno.land/r/demo/groups_test
2package groups_test
3
4// SEND: 1000000ugnot
5
6import (
7 "std"
8 "testing"
9
10 "gno.land/r/demo/groups"
11 users "gno.land/r/gnoland/users/v1"
12)
13
14var gid groups.GroupID
15
16func main() {
17 testing.SetRealm(std.NewUserRealm(std.Address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"))) // so that CurrentRealm.Addr() matches OrigCaller
18 users.Register("gnouser123")
19 gid = groups.CreateGroup("test_group")
20 println(gid)
21 println(groups.Render(""))
22}
23
24// Output:
25// 1
26// List of all Groups:
27//
28// * [test_group](/r/demo/groups:test_group)
29//