z_27_a_filetest.gno

0.71 Kb ยท 38 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	boards2 "gno.land/r/gnoland/boards2/v1"
 7)
 8
 9const (
10	owner = address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
11	user  = address("g1vh7krmmzfua5xjmkatvmx09z37w34lsvd2mxa5")
12)
13
14var bid boards2.BoardID
15
16func init() {
17	testing.SetRealm(testing.NewUserRealm(owner))
18	bid = boards2.CreateBoard(cross, "test123", false)
19
20	testing.SetRealm(testing.NewUserRealm(user))
21	boards2.RequestInvite(cross, bid)
22}
23
24func main() {
25	testing.SetRealm(testing.NewUserRealm(owner))
26
27	boards2.RevokeInvite(cross, bid, user)
28
29	println(boards2.IsMember(bid, user))
30	println()
31	println(boards2.Render("test123/invites"))
32}
33
34// Output:
35// false
36//
37// # test123 Invite Requests
38// ### Board has no invite requests