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.48 Kb · 18 lines
 1package collatz
 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 leaderboard links each n to this realm's own sequence page. It once
12// linked to the malformed gno.land/r:<n>.
13func TestLeaderboardLinksNameThisRealm(cur realm, t *testing.T) {
14	testing.SetRealm(testing.NewUserRealm(testutils.TestAddress("linker")))
15	Compute(cross(cur), 7)
16	out := Render("")
17	uassert.True(t, strings.Contains(out, "](/r/moul/x/daily/collatz/v1:7)"), out)
18}