z_21_a_filetest.gno

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