1package main
2
3import (
4 "std"
5
6 "gno.land/p/demo/testutils"
7 "gno.land/r/demo/users"
8)
9
10const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
11
12func main() {
13 caller := std.GetOrigCaller() // main
14 test2 := testutils.TestAddress("test2")
15 // as admin, invite gnouser and test2
16 std.TestSetOrigCaller(admin)
17 users.Invite(caller.String() + "\n" + test2.String())
18 // register as caller
19 std.TestSetOrigCaller(caller)
20 users.Register(admin, "gnouser", "my profile")
21 // register as test2
22 std.TestSetOrigCaller(test2)
23 users.Register(admin, "test222", "my profile 2")
24 println("done")
25}
26
27// Output:
28// done
z_9_filetest.gno
0.61 Kb ยท 28 lines