package main // SEND: 1000000ugnot import ( "testing" "gno.land/p/gnoland/boards" boards2 "gno.land/r/boards000/v1rc1" users "gno.land/r/gnoland/users/v1" ) const ( owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx member address = "g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj" // @test2 name = "foo123" newName = "barbaz123" ) var bid boards.ID // Operate on board DAO func init() { testing.SetRealm(testing.NewUserRealm(owner)) bid = boards2.CreateBoard(cross, name, false) boards2.InviteMember(cross, bid, member, boards2.RoleOwner) // Test1 is the boards owner and its address has a user already registered // so a new member must register a user with the new board name. testing.SetRealm(testing.NewUserRealm(member)) users.Register(cross, newName) } func main() { testing.SetRealm(testing.NewUserRealm(member)) boards2.RenameBoard(cross, name, newName) // Ensure board is renamed by another board owner bid2, _ := boards2.GetBoardIDFromName(cross, newName) println("IDs match =", bid == bid2) } // Output: // IDs match = true