z_9_a_filetest.gno

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