z_11_b_filetest.gno

0.51 Kb ยท 30 lines
 1package main
 2
 3import (
 4	"std"
 5	"testing"
 6
 7	boards2 "gno.land/r/gnoland/boards2/v1"
 8)
 9
10const owner = std.Address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
11
12var (
13	bid boards2.BoardID
14	pid boards2.PostID
15)
16
17func init() {
18	testing.SetRealm(std.NewUserRealm(owner))
19	bid = boards2.CreateBoard(cross, "test-board", false)
20	pid = boards2.CreateThread(cross, bid, "Foo", "bar")
21}
22
23func main() {
24	testing.SetRealm(std.NewUserRealm(owner))
25
26	boards2.EditThread(cross, bid, pid, "", "bar")
27}
28
29// Error:
30// title is empty