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