Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_2_e_filetest.gno

0.60 Kb · 26 lines
 1// PKGPATH: gno.land/p/archive/groups_test
 2package groups_test
 3
 4// SEND: 1000000ugnot
 5
 6import (
 7	"testing"
 8
 9	"gno.land/r/archive/groups"
10	uinit "gno.land/r/sys/users/init"
11)
12
13var gid groups.GroupID
14
15func main() {
16	testing.SetRealm(testing.NewUserRealm(address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"))) // so that CurrentRealm.Addr() matches OrigCaller
17	uinit.RegisterUser(cross, "gnouser123", address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"))
18	gid = groups.CreateGroup(cross, "test_group")
19	println(gid)
20	groups.DeleteGroup(cross, gid)
21	println(groups.Render(""))
22}
23
24// Output:
25// 1
26// List of all Groups: