z_2_e_filetest.gno
0.63 Kb ยท 34 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 (
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)
21 tid = boards2.CreateThread(cross, bid, "Foo", "bar")
22
23 // Hide thread by flagging it so reply can't be submitted
24 boards2.FlagThread(cross, bid, tid, "reason")
25}
26
27func main() {
28 testing.SetRealm(testing.NewUserRealm(owner))
29
30 boards2.CreateReply(cross, bid, tid, 0, "Test reply")
31}
32
33// Error:
34// thread is hidden