Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_0_k_filetest.gno

0.47 Kb ยท 24 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	boards2 "gno.land/r/gnoland/boards2/v1"
 7)
 8
 9const owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx
10
11func init() {
12	testing.SetRealm(testing.NewUserRealm(owner))
13	boards2.CreateBoard(cross, "TEST123", false)
14}
15
16func main() {
17	testing.SetRealm(testing.NewUserRealm(owner))
18
19	// Should fail because board name already exists with a different casing
20	boards2.CreateBoard(cross, "test123", false)
21}
22
23// Error:
24// board already exists