z_27_a_filetest.gno
0.73 Kb ยท 40 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 (
12 owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx
13 user address = "g1vh7krmmzfua5xjmkatvmx09z37w34lsvd2mxa5"
14)
15
16var bid boards.ID
17
18func init() {
19 testing.SetRealm(testing.NewUserRealm(owner))
20 bid = boards2.CreateBoard(cross, "test123", false)
21
22 testing.SetRealm(testing.NewUserRealm(user))
23 boards2.RequestInvite(cross, bid)
24}
25
26func main() {
27 testing.SetRealm(testing.NewUserRealm(owner))
28
29 boards2.RevokeInvite(cross, bid, user)
30
31 println(boards2.IsMember(bid, user))
32 println()
33 println(boards2.Render("test123/invites"))
34}
35
36// Output:
37// false
38//
39// # test123 Invite Requests
40// ### Board has no invite requests