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