z_3_j_filetest.gno
0.48 Kb ยท 27 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 user address = "g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj" // @test2
12 name = "foo123"
13)
14
15func init() {
16 testing.SetRealm(testing.NewUserRealm(owner))
17 boards2.CreateBoard(cross, name, false)
18}
19
20func main() {
21 testing.SetRealm(testing.NewUserRealm(user))
22
23 boards2.RenameBoard(cross, name, "barbaz")
24}
25
26// Error:
27// unauthorized