z_0_d_filetest.gno

0.58 Kb ยท 27 lines
 1// PKGPATH: gno.land/r/archive/boards_test
 2package boards_test
 3
 4// SEND: 1000000ugnot
 5
 6import (
 7	"testing"
 8
 9	"gno.land/r/archive/boards"
10	users "gno.land/r/gnoland/users/v1"
11)
12
13var bid boards.BoardID
14
15func init() {
16	testing.SetRealm(testing.NewUserRealm(address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"))) // so that CurrentRealm.Addr() matches OrigCaller
17	users.Register(cross, "gnouser123")
18	bid = boards.CreateBoard(cross, "test_board")
19	boards.CreateReply(cross, bid, 0, 0, "Reply of the second post")
20}
21
22func main() {
23	println(boards.Render("test_board"))
24}
25
26// Error:
27// thread not exist