z_3_h_filetest.gno
0.54 Kb ยท 31 lines
1package main
2
3import (
4 "strings"
5 "testing"
6
7 boards2 "gno.land/r/gnoland/boards2/v1"
8)
9
10const (
11 owner = address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
12 name = "foo123"
13)
14
15var newName string
16
17func init() {
18 newName = strings.Repeat("A", boards2.MaxBoardNameLength+1)
19
20 testing.SetRealm(testing.NewUserRealm(owner))
21 boards2.CreateBoard(cross, name, false)
22}
23
24func main() {
25 testing.SetRealm(testing.NewUserRealm(owner))
26
27 boards2.RenameBoard(cross, name, newName)
28}
29
30// Error:
31// board name is too long, maximum allowed is 50 characters