Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_set_flagging_threshold_00_filetest.gno

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