z_7_a_filetest.gno

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