z_2_f_filetest.gno
0.51 Kb ยท 29 lines
1// PKGPATH: gno.land/p/archive/groups_test
2package groups_test
3
4// SEND: 1000000ugnot
5
6import (
7 "chain/runtime"
8 "testing"
9
10 "gno.land/r/archive/groups"
11 users "gno.land/r/gnoland/users/v1"
12)
13
14var gid groups.GroupID
15
16func main() {
17 caller := runtime.OriginCaller()
18 testing.SetRealm(testing.NewUserRealm(caller))
19 users.Register(cross, "gnouser123")
20
21 gid = groups.CreateGroup(cross, "test_group")
22
23 println(gid)
24 groups.DeleteGroup(cross, 20)
25 println(groups.Render(""))
26}
27
28// Error:
29// group id (20) does not exists