Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

z_ui_board_04_filetest.gno

1.04 Kb · 34 lines
 1// PKGPATH: gno.land/r/gnoland/boards2/v0/filetests/z_ui_board_04_filetest
 2
 3// Render default board view when there are no threads.
 4package z_ui_board_04_filetest
 5
 6import (
 7	"testing"
 8
 9	boards2 "gno.land/r/gnoland/boards2/v0"
10)
11
12const (
13	owner     address = "g1skl80cuz8zq3lul9pgz5pc35l2pfzgxgfpsqkx"
14	boardName         = "TestBoard"
15)
16
17func init(cur realm) {
18	testing.SetRealm(testing.NewUserRealm(owner))
19
20	boards2.CreateBoard(cross(cur), boardName, false, false)
21}
22
23func main() {
24	println(boards2.Render(boardName))
25}
26
27// Output:
28// # [Boards](/r/gnoland/boards2/v0) › TestBoard
29// Created by [g1skl80cuz8zq3lul9pgz5pc35l2pfzgxgfpsqkx](/u/g1skl80cuz8zq3lul9pgz5pc35l2pfzgxgfpsqkx) on 2009-02-13 11:31pm UTC, #1
30// ↳ [Create Thread](/r/gnoland/boards2/v0:TestBoard/create-thread) • [Request Invite](/r/gnoland/boards2/v0$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/v0:TestBoard/create-thread) in this board?