z_edit_thread_02_filetest.gno
0.65 Kb · 33 lines
1// PKGPATH: gno.land/r/gnoland/boards2/v1/filetests/z_edit_thread_02_filetest
2
3package z_edit_thread_02_filetest
4
5import (
6 "testing"
7
8 "gno.land/p/gnoland/boards"
9
10 boards2 "gno.land/r/gnoland/boards2/v1"
11)
12
13const owner address = "g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh"
14
15var (
16 bid boards.ID
17 pid boards.ID
18)
19
20func init(cur realm) {
21 testing.SetRealm(testing.NewUserRealm(owner))
22 bid = boards2.CreateBoard(cross(cur), "test-board", false, false)
23 pid = boards2.CreateThread(cross(cur), bid, "Foo", "bar")
24}
25
26func main(cur realm) {
27 testing.SetRealm(testing.NewUserRealm(owner))
28
29 boards2.EditThread(cross(cur), bid, pid, "Foo", "")
30}
31
32// Error:
33// body is empty