z_7_a_filetest.gno
0.49 Kb ยท 33 lines
1package main
2
3import (
4 "std"
5 "testing"
6
7 boards2 "gno.land/r/gnoland/boards2/v1"
8)
9
10const (
11 owner = std.Address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
12 name = "test123"
13)
14
15var bid boards2.BoardID
16
17func init() {
18 testing.SetRealm(std.NewUserRealm(owner))
19 bid = boards2.CreateBoard(cross, name, false)
20}
21
22func main() {
23 testing.SetRealm(std.NewUserRealm(owner))
24
25 bid2, found := boards2.GetBoardIDFromName(cross, name)
26
27 println(found)
28 println(bid2 == bid)
29}
30
31// Output:
32// true
33// true