z_4_f_filetest.gno

0.60 Kb ยท 30 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	admin = address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj") // @test2
12)
13
14var bid boards2.BoardID // Operate on board DAO
15
16func init() {
17	testing.SetRealm(testing.NewUserRealm(owner))
18	bid = boards2.CreateBoard(cross, "test123", false)
19
20	boards2.InviteMember(cross, bid, admin, boards2.RoleGuest)
21}
22
23func main() {
24	testing.SetRealm(testing.NewUserRealm(owner))
25
26	boards2.ChangeMemberRole(cross, bid, admin, boards2.Role("foo"))
27}
28
29// Error:
30// invalid role: foo