/r/demo/boards/z_12_c_filetest.gno
// PKGPATH: gno.land/r/boards_test
package boards_test

// SEND: 200000000ugnot

import (
	"gno.land/r/demo/boards"
	"gno.land/r/demo/users"
)

func main() {
	users.Register("", "gnouser", "my profile")
	bid1 := boards.CreateBoard("test_board1")
	boards.CreateThread(bid1, "First Post (title)", "Body of the first post. (body)")
	bid2 := boards.CreateBoard("test_board2")

	// create a repost to a non-existing thread
	rid := boards.CreateRepost(bid1, 5, "", "Check this out", bid2)
	println(rid)
	println(boards.Render("test_board1"))
}

// Error:
// thread not exist