// PKGPATH: gno.land/r/demo/groups_test package groups_test // SEND: 1000000ugnot import ( "std" "testing" "gno.land/p/demo/testutils" "gno.land/r/demo/groups" users "gno.land/r/gnoland/users/v1" ) var gid groups.GroupID func main() { caller := std.OriginCaller() testing.SetRealm(std.NewUserRealm(caller)) users.Register("gnouser123") gid = groups.CreateGroup("test_group") println(gid) // delete group via anon user test2 := testutils.TestAddress("test2") testing.SetOriginCaller(test2) testing.SetOriginSend(std.Coins{{"ugnot", 9000000}}) groups.DeleteGroup(gid) println(groups.Render("")) } // Error: // unauthorized to delete group