Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_freeze_thread_00_filetest.gno

0.59 Kb · 34 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	"gno.land/p/gnoland/boards"
 7
 8	boards2 "gno.land/r/gnoland/boards2/v1"
 9)
10
11const owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq"
12
13var (
14	bid boards.ID
15	tid boards.ID
16)
17
18func init() {
19	testing.SetRealm(testing.NewUserRealm(owner))
20	bid = boards2.CreateBoard(cross, "test123", false, false)
21	tid = boards2.CreateThread(cross, bid, "foo", "bar")
22
23	boards2.FreezeBoard(cross, bid)
24}
25
26func main() {
27	testing.SetRealm(testing.NewUserRealm(owner))
28
29	// Attempt to freeze a thread on frozen board
30	boards2.FreezeThread(cross, bid, tid)
31}
32
33// Error:
34// board is frozen