z_0_e_filetest.gno
0.54 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.CreateReply(cross, bid, 0, 0, "Reply of the second post")
19}
20
21func main() {
22 println(boards.Render("test_board"))
23}
24
25// Error:
26// board not exist