z_set_realm_notice_01_filetest.gno
0.59 Kb · 28 lines
1// PKGPATH: gno.land/r/gnoland/boards2/v1/filetests/z_set_realm_notice_01_filetest
2
3package z_set_realm_notice_01_filetest
4
5import (
6 "testing"
7
8 boards2 "gno.land/r/gnoland/boards2/v1"
9)
10
11const owner address = "g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh"
12
13func init(cur realm) {
14 // Set an initial message so it can be cleared
15 testing.SetRealm(testing.NewUserRealm(owner))
16 boards2.SetRealmNotice(cross(cur), "This is a test realm message")
17}
18
19func main(cur realm) {
20 testing.SetRealm(testing.NewUserRealm(owner))
21
22 boards2.SetRealmNotice(cross(cur), "")
23
24 println(boards2.Notice == "")
25}
26
27// Output:
28// true