Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_24_c_filetest.gno

0.49 Kb ยท 28 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	// Calling as a non member should fail
24	boards2.GetBoard(bid)
25}
26
27// Error:
28// forbidden