z_2_d_filetest.gno
0.61 Kb ยท 32 lines
1// PKGPATH: gno.land/p/archive/groups_test
2package groups_test
3
4// SEND: 200000000ugnot
5
6import (
7 "chain"
8 "testing"
9
10 "gno.land/p/nt/testutils"
11 "gno.land/r/archive/groups"
12 users "gno.land/r/gnoland/users/v1"
13)
14
15var gid groups.GroupID
16
17func main() {
18 users.Register(cross, "gnouser123")
19 gid = groups.CreateGroup(cross, "test_group")
20 println(gid)
21
22 // delete member via anon user
23 test2 := testutils.TestAddress("test2")
24 testing.SetOriginCaller(test2)
25 testing.SetOriginSend(chain.Coins{{"ugnot", 9000000}})
26
27 groups.DeleteMember(cross, gid, 0)
28 println(groups.Render(""))
29}
30
31// Error:
32// r/gnoland/users: non-user call