Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_16_a_filetest.gno

0.50 Kb ยท 28 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	boards2 "gno.land/r/gnoland/boards2/v1"
 7)
 8
 9const owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx
10
11var bid boards2.BoardID
12
13func init() {
14	testing.SetRealm(testing.NewUserRealm(owner))
15	bid = boards2.CreateBoard(cross, "test-board", false)
16}
17
18func main() {
19	testing.SetRealm(testing.NewUserRealm(owner))
20
21	boards2.SetFlaggingThreshold(cross, bid, 4)
22
23	// Ensure that flagging threshold changed
24	println(boards2.GetFlaggingThreshold(bid))
25}
26
27// Output:
28// 4