Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_blog_0_filetest.gno

0.34 Kb ยท 20 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	"gno.land/p/lou/blog"
 7)
 8
 9func main() {
10	user := address("g1testuser")
11	testing.SetRealm(testing.NewUserRealm(user))
12	testing.SetRealm(testing.NewCodeRealm("gno.land/r/test"))
13	_, err := blog.NewBlog("", user)
14	if err != nil {
15		println("error:", err.Error())
16	}
17}
18
19// Output:
20// error: title cannot be empty