Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_create_board_02_filetest.gno

0.57 Kb · 28 lines
 1// PKGPATH: gno.land/r/gnoland/boards2/v1/filetests/z_create_board_02_filetest
 2
 3package z_create_board_02_filetest
 4
 5import (
 6	"testing"
 7
 8	boards2 "gno.land/r/gnoland/boards2/v1"
 9)
10
11const (
12	owner     address = "g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh"
13	boardName         = "test123"
14)
15
16func init(cur realm) {
17	testing.SetRealm(testing.NewUserRealm(owner))
18	boards2.CreateBoard(cross(cur), boardName, false, false)
19}
20
21func main(cur realm) {
22	testing.SetRealm(testing.NewUserRealm(owner))
23
24	boards2.CreateBoard(cross(cur), boardName, false, false)
25}
26
27// Error:
28// board already exists