Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_lock_realm_02_filetest.gno

0.53 Kb · 21 lines
 1// PKGPATH: gno.land/r/gnoland/boards2/v1/filetests/z_lock_realm_02_filetest
 2
 3package z_lock_realm_02_filetest
 4
 5import (
 6	"testing"
 7
 8	boards2 "gno.land/r/gnoland/boards2/v1"
 9)
10
11const owner address = "g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj" // @test2
12
13func main(cur realm) {
14	// Call realm with a user that has not permission to lock the realm
15	testing.SetRealm(testing.NewUserRealm(owner))
16
17	boards2.LockRealm(cross(cur), false)
18}
19
20// Error:
21// unauthorized, user g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj doesn't have the required permission