z_1_c_filetest.gno

0.49 Kb ยท 28 lines
 1// PKGPATH: gno.land/r/demo/groups_test
 2package groups_test
 3
 4// SEND: 200000000ugnot
 5
 6import (
 7	"std"
 8
 9	"gno.land/p/demo/testutils"
10	"gno.land/r/demo/groups"
11)
12
13var gid groups.GroupID
14
15func main() {
16	gid = groups.CreateGroup("test_group")
17	println(gid)
18
19	// add member via anon user
20	test2 := testutils.TestAddress("test2")
21	std.TestSetOrigCaller(test2)
22	std.TestSetOrigSend(std.Coins{{"ugnot", 9000000}}, nil)
23
24	groups.AddMember(gid, test2.String(), 42, "metadata3")
25}
26
27// Error:
28// user not found