Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_25_a_filetest.gno

0.98 Kb · 33 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	"gno.land/p/gnoland/boards"
 7
 8	boards2 "gno.land/r/boards000/v1rc1"
 9)
10
11const owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx
12
13var bid boards.ID
14
15func init() {
16	testing.SetRealm(testing.NewUserRealm(owner))
17	bid = boards2.CreateBoard(cross, "test123", false)
18}
19
20func main() {
21	testing.SetRealm(testing.NewUserRealm("g1vh7krmmzfua5xjmkatvmx09z37w34lsvd2mxa5"))
22
23	boards2.RequestInvite(cross, bid)
24
25	println(boards2.Render("test123/invites"))
26}
27
28// Output:
29// # test123 Invite Requests
30// ### These users have requested to be invited to the board
31// | User | Request Date | Actions |
32// | --- | --- | --- |
33// | [g1vh7krmmzfua5xjmkatvmx09z37w34lsvd2mxa5](/u/g1vh7krmmzfua5xjmkatvmx09z37w34lsvd2mxa5) | 2009-02-13 11:31pm UTC | [accept](/r/gnoland/boards2/v1$help&func=AcceptInvite&boardID=1&user=g1vh7krmmzfua5xjmkatvmx09z37w34lsvd2mxa5) • [revoke](/r/gnoland/boards2/v1$help&func=RevokeInvite&boardID=1&user=g1vh7krmmzfua5xjmkatvmx09z37w34lsvd2mxa5) |