z_ui_board_04_filetest.gno
1.04 Kb · 34 lines
1// PKGPATH: gno.land/r/gnoland/boards2/v1/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/v1"
10)
11
12const (
13 owner address = "g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh"
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/v1) › TestBoard
29// Created by [g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh](/u/g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh) on 2009-02-13 11:31pm UTC, #1
30// ↳ [Create Thread](/r/gnoland/boards2/v1:TestBoard/create-thread) • [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:TestBoard/create-thread) in this board?