Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_freeze_board_01_filetest.gno

0.60 Kb · 30 lines
 1// PKGPATH: gno.land/r/gnoland/boards2/v1/filetests/z_freeze_board_01_filetest
 2
 3package z_freeze_board_01_filetest
 4
 5import (
 6	"testing"
 7
 8	"gno.land/p/gnoland/boards"
 9
10	boards2 "gno.land/r/gnoland/boards2/v1"
11)
12
13const owner address = "g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh"
14
15var bid boards.ID
16
17func init(cur realm) {
18	testing.SetRealm(testing.NewUserRealm(owner))
19	bid = boards2.CreateBoard(cross(cur), "test123", false, false)
20	boards2.FreezeBoard(cross(cur), bid)
21}
22
23func main(cur realm) {
24	testing.SetRealm(testing.NewUserRealm(owner))
25
26	boards2.FreezeBoard(cross(cur), bid)
27}
28
29// Error:
30// board is frozen