z_0_c_filetest.gno
0.56 Kb ยท 26 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 boards.CreateThread(cross, 1, "First Post (title)", "Body of the first post. (body)")
19}
20
21func main() {
22 println(boards.Render("test_board"))
23}
24
25// Error:
26// board not exist