Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_30_a_filetest.gno

0.60 Kb ยท 33 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	"gno.land/p/gnoland/boards"
 7
 8	boards2 "gno.land/r/boards000/v1rc1"
 9)
10
11const (
12	owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx
13	user  address = "g1vh7krmmzfua5xjmkatvmx09z37w34lsvd2mxa5"
14)
15
16var bid boards.ID
17
18func init() {
19	testing.SetRealm(testing.NewUserRealm(owner))
20	bid = boards2.CreateBoard(cross, "test123", false)
21	boards2.Ban(cross, bid, user, boards2.BanDay, "Unpolite behavior")
22}
23
24func main() {
25	testing.SetRealm(testing.NewUserRealm(owner))
26
27	boards2.Unban(cross, bid, user, "")
28
29	println(boards2.IsBanned(bid, user))
30}
31
32// Output:
33// false