z_9_a_filetest.gno

0.58 Kb ยท 29 lines
 1// PKGPATH: gno.land/r/demo/boards_test
 2package boards_test
 3
 4// SEND: 1000000ugnot
 5
 6import (
 7	"std"
 8	"testing"
 9
10	"gno.land/r/demo/boards"
11	users "gno.land/r/gnoland/users/v1"
12)
13
14var dstBoard boards.BoardID
15
16func init() {
17	testing.SetRealm(std.NewUserRealm(std.Address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"))) // so that CurrentRealm.Addr() matches OrigCaller
18	users.Register("gnouser123")
19
20	dstBoard = boards.CreateBoard("dst_board")
21
22	boards.CreateRepost(0, 0, "First Post in (title)", "Body of the first post. (body)", dstBoard)
23}
24
25func main() {
26}
27
28// Error:
29// src board not exist