z_21_a_filetest.gno

0.45 Kb ยท 23 lines
 1package main
 2
 3import (
 4	"strings"
 5	"testing"
 6
 7	boards2 "gno.land/r/gnoland/boards2/v1"
 8)
 9
10const owner = address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
11
12func main() {
13	testing.SetRealm(testing.NewUserRealm(owner))
14
15	boards2.SetRealmNotice(cross, "This is a test realm message")
16
17	// Render content must contain the message
18	content := boards2.Render("")
19	println(strings.HasPrefix(content, "> This is a test realm message\n"))
20}
21
22// Output:
23// true