Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_15_b_filetest.gno

0.65 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 owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx
12
13var (
14	srcBID boards.ID
15	dstBID boards.ID
16	srcTID boards.ID = 1024
17)
18
19func init() {
20	testing.SetRealm(testing.NewUserRealm(owner))
21	srcBID = boards2.CreateBoard(cross, "src-board", false)
22	dstBID = boards2.CreateBoard(cross, "dst-board", false)
23}
24
25func main() {
26	testing.SetRealm(testing.NewUserRealm(owner))
27
28	// Repost should fail if source thread doesn't exist
29	boards2.CreateRepost(cross, srcBID, srcTID, dstBID, "foo", "bar")
30}
31
32// Error:
33// thread does not exist with ID: 1024