From 4d80378640ef328cd3fa551517c984a6cf27b26b Mon Sep 17 00:00:00 2001 From: Mikael VALLENET Date: Fri, 22 Nov 2024 02:30:11 +0100 Subject: [PATCH] docs(std/testing): fix NewUserRealm reference usage (#3178) FIX: https://docs.gno.land/reference/stdlibs/std/testing/#testsetrealm FROM #### Usage ```go addr := std.Address("g1ecely4gjy0yl6s9kt409ll330q9hk2lj9ls3ec") std.TestSetRealm(std.NewUserRealm("")) // or std.TestSetRealm(std.NewCodeRealm("gno.land/r/demo/users")) ``` TO #### Usage ```go addr := std.Address("g1ecely4gjy0yl6s9kt409ll330q9hk2lj9ls3ec") std.TestSetRealm(std.NewUserRealm(addr)) // or std.TestSetRealm(std.NewCodeRealm("gno.land/r/demo/users")) ```
Contributors' checklist... - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests
--- docs/reference/stdlibs/std/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/stdlibs/std/testing.md b/docs/reference/stdlibs/std/testing.md index e3e87ea7262..8a95ecf7827 100644 --- a/docs/reference/stdlibs/std/testing.md +++ b/docs/reference/stdlibs/std/testing.md @@ -106,7 +106,7 @@ Should be used in combination with [`NewUserRealm`](#newuserrealm) & #### Usage ```go addr := std.Address("g1ecely4gjy0yl6s9kt409ll330q9hk2lj9ls3ec") -std.TestSetRealm(std.NewUserRealm("")) +std.TestSetRealm(std.NewUserRealm(addr)) // or std.TestSetRealm(std.NewCodeRealm("gno.land/r/demo/users")) ```