1// PKGPATH: gno.land/r/demo/boards_test
2package boards_test
3
4import (
5 "gno.land/r/demo/boards"
6)
7
8var bid boards.BoardID
9
10func init() {
11 bid = boards.CreateBoard("test_board")
12 boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)")
13 pid := boards.CreateThread(bid, "Second Post (title)", "Body of the second post. (body)")
14 boards.CreateReply(bid, pid, pid, "Reply of the second post")
15}
16
17func main() {
18 println(boards.Render("test_board"))
19}
20
21// Error:
22// unauthorized
z_0_a_filetest.gno
0.49 Kb ยท 22 lines