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