Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions 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 vault
 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 vault to this realm's own page. It once linked to
12// the malformed gno.land/r:<address>.
13func TestIndexLinksNameThisRealm(cur realm, t *testing.T) {
14	who := testutils.TestAddress("linker")
15	testing.SetRealm(testing.NewUserRealm(who))
16	Set(cross(cur), "k", "v")
17	out := Render("")
18	uassert.True(t, strings.Contains(out, "](/r/moul/x/daily/vault/v1:"+who.String()+")"), out)
19}