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