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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

zz_links_test.gno

0.66 Kb · 20 lines
 1package handles
 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 handle to this realm's own page, and a missing
12// handle links back to the index. Both once resolved to gno.land itself.
13func TestLinksNameThisRealm(cur realm, t *testing.T) {
14	testing.SetRealm(testing.NewUserRealm(testutils.TestAddress("linker")))
15	Register(cross(cur), "linker")
16	idx := Render("")
17	uassert.True(t, strings.Contains(idx, "[linker](/r/nym-moultest123/x/daily/handles/v1:linker)"), idx)
18	miss := Render("nobodyhere")
19	uassert.True(t, strings.Contains(miss, "[← all handles](/r/nym-moultest123/x/daily/handles/v1)"), miss)
20}