z_ui_2_e_filetest.gno

0.95 Kb · 34 lines
 1// Render default board view when there are no threads.
 2package main
 3
 4import (
 5	"std"
 6	"testing"
 7
 8	boards2 "gno.land/r/gnoland/boards2/v1"
 9)
10
11const (
12	owner     = std.Address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
13	boardName = "BoardName"
14)
15
16func init() {
17	testing.SetRealm(std.NewUserRealm(owner))
18
19	boards2.CreateBoard(cross, boardName, false)
20}
21
22func main() {
23	println(boards2.Render(boardName))
24}
25
26// Output:
27// # BoardName
28// Board created by [g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq](/u/g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq) on 2009-02-13 11:31pm UTC, #1
29//
30// [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)
31//
32// ---
33// ### This board doesn't have any threads
34// Do you want to [start a new conversation](/r/gnoland/boards2/v1$help&func=CreateThread&boardID=1&body=&title=) in this board ?