z_flag_thread_08_filetest.gno
0.53 Kb · 31 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 pid boards.ID
16)
17
18func init() {
19 testing.SetRealm(testing.NewUserRealm(owner))
20 bid = boards2.CreateBoard(cross, "test-board", false, false)
21 pid = boards2.CreateThread(cross, bid, "Foo", "bar")
22}
23
24func main() {
25 testing.SetRealm(testing.NewUserRealm(owner))
26
27 boards2.FlagThread(cross, bid, pid, "")
28}
29
30// Error:
31// flagging reason is required