z_1_filetest.gno
0.73 Kb · 31 lines
1package main
2
3// SEND: 1000000ugnot
4
5import (
6 "testing"
7
8 "gno.land/r/archive/boards"
9 uinit "gno.land/r/sys/users/init"
10)
11
12var board *boards.Board
13
14func init() {
15 testing.SetRealm(testing.NewUserRealm(address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"))) // so that CurrentRealm.Addr() matches OrigCaller
16 uinit.RegisterUser(cross, "gnouser123", address("g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm"))
17
18 _ = boards.CreateBoard(cross, "test_board_1")
19 _ = boards.CreateBoard(cross, "test_board_2")
20}
21
22func main() {
23 println(boards.Render(""))
24}
25
26// Output:
27// These are all the boards of this realm:
28//
29// * [/r/archive/boards:test_board_1](/r/archive/boards:test_board_1)
30// * [/r/archive/boards:test_board_2](/r/archive/boards:test_board_2)
31//