z_28_a_filetest.gno
0.54 Kb ยท 30 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 = "g1vh7krmmzfua5xjmkatvmx09z37w34lsvd2mxa5"
12)
13
14var bid boards2.BoardID
15
16func init() {
17 testing.SetRealm(testing.NewUserRealm(owner))
18 bid = boards2.CreateBoard(cross, "test123", false)
19}
20
21func main() {
22 testing.SetRealm(testing.NewUserRealm(owner))
23
24 boards2.Ban(cross, bid, user, boards2.BanDay, "Unpolite behavior")
25
26 println(boards2.IsBanned(bid, user))
27}
28
29// Output:
30// true