Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_create_board_09_filetest.gno

0.60 Kb · 26 lines
 1// PKGPATH: gno.land/r/gnoland/boards2/v1/filetests/z_create_board_09_filetest
 2
 3package z_create_board_09_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	testing.SetRealm(testing.NewUserRealm(owner))
15	boards2.CreateBoard(cross(cur), "TEST123", false, false)
16}
17
18func main(cur realm) {
19	testing.SetRealm(testing.NewUserRealm(owner))
20
21	// Should fail because board name already exists with a different casing
22	boards2.CreateBoard(cross(cur), "test123", false, false)
23}
24
25// Error:
26// board already exists