z_ui_2_e_filetest.gno

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