z_0_j_filetest.gno
1.36 Kb · 43 lines
1package main
2
3import (
4 "testing"
5
6 boards2 "gno.land/r/boards000/v1rc1"
7)
8
9const (
10 owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx
11 name = "TestBoard"
12)
13
14func main() {
15 testing.SetRealm(testing.NewUserRealm(owner))
16
17 boards2.CreateBoard(cross, name, false)
18
19 // Unlisted board should not be rendered
20 println(boards2.Render(""))
21
22 // Unlisted board can be rendered by path
23 println("\n==================")
24 println(boards2.Render(name))
25}
26
27// Output:
28// # Boards
29// [Create Board](/r/gnoland/boards2/v1$help&func=CreateBoard&listed=true&name=) • [List Admin Users](/r/gnoland/boards2/v1:admin-users) • [Help](/r/gnoland/boards2/v1:help)
30//
31// ---
32// ### Currently there are no boards
33// Be the first to [create a new board](/r/gnoland/boards2/v1$help&func=CreateBoard&listed=true&name=) !
34//
35// ==================
36// # TestBoard
37// Board created by [g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq](/u/g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq) on 2009-02-13 11:31pm UTC, #1
38//
39// [Create Thread](/r/gnoland/boards2/v1$help&func=CreateThread&boardID=1&body=&title=) • [Request Invite](/r/gnoland/boards2/v1$help&func=RequestInvite&boardID=1) • [Manage Board](?menu=manageBoard)
40//
41// ---
42// ### This board doesn't have any threads
43// Do you want to [start a new conversation](/r/gnoland/boards2/v1$help&func=CreateThread&boardID=1&body=&title=) in this board ?