z_5_a_filetest.gno

0.65 Kb ยท 34 lines
 1package main
 2
 3import (
 4	"std"
 5	"testing"
 6
 7	boards2 "gno.land/r/gnoland/boards2/v1"
 8)
 9
10const (
11	owner = std.Address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
12	user  = std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj") // @test2
13)
14
15var bid boards2.BoardID // Operate on board DAO
16
17func init() {
18	testing.SetRealm(std.NewUserRealm(owner))
19	bid = boards2.CreateBoard(cross, "test123", false)
20
21	boards2.InviteMember(cross, bid, user, boards2.RoleGuest)
22}
23
24func main() {
25	testing.SetRealm(std.NewUserRealm(owner))
26
27	boards2.RemoveMember(cross, bid, user)
28
29	// Check that user is not a member
30	println(boards2.IsMember(bid, user))
31}
32
33// Output:
34// false