z_0_c_filetest.gno

0.56 Kb ยท 27 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	users "gno.land/r/gnoland/users/v1"
11)
12
13var gid groups.GroupID
14
15func main() {
16	testing.SetRealm(testing.NewUserRealm(address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"))) // so that CurrentRealm.Addr() matches OrigCaller
17	users.Register(cross, "gnouser123")
18	gid = groups.CreateGroup(cross, "test_group")
19	println(gid)
20	println(groups.Render(""))
21}
22
23// Output:
24// 1
25// List of all Groups:
26//
27//  * [test_group](/r/demo/groups:test_group)