z_19_c_filetest.gno
0.53 Kb ยท 31 lines
1package main
2
3import (
4 "testing"
5
6 boards2 "gno.land/r/gnoland/boards2/v1"
7)
8
9const owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx
10
11var (
12 bid boards2.BoardID
13 tid boards2.PostID
14)
15
16func init() {
17 testing.SetRealm(testing.NewUserRealm(owner))
18 bid = boards2.CreateBoard(cross, "test123", false)
19 tid = boards2.CreateThread(cross, bid, "foo", "bar")
20}
21
22func main() {
23 testing.SetRealm(testing.NewUserRealm(owner))
24
25 boards2.FreezeThread(cross, bid, tid)
26
27 println(boards2.IsThreadFrozen(bid, tid))
28}
29
30// Output:
31// true