Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

zz_links_test.gno

0.50 Kb · 19 lines
 1package linktree
 2
 3import (
 4	"strings"
 5	"testing"
 6
 7	"gno.land/p/nt/testutils/v0"
 8	"gno.land/p/nt/uassert/v0"
 9)
10
11// The index links each profile to this realm's own page. It once linked to
12// /r/REPLACE_ADDR/linktree.
13func TestIndexLinksNameThisRealm(cur realm, t *testing.T) {
14	who := testutils.TestAddress("linker")
15	testing.SetRealm(testing.NewUserRealm(who))
16	SetBio(cross(cur), "links")
17	out := Render("")
18	uassert.True(t, strings.Contains(out, "](/r/moul/x/daily/linktree/v1:"+who.String()+")"), out)
19}