z_6_d_filetest.gno
0.80 Kb · 39 lines
1package main
2
3import (
4 "testing"
5
6 pcommondao "gno.land/p/nt/commondao/v0"
7
8 "gno.land/r/nt/commondao/v0"
9)
10
11const (
12 owner = address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
13 user = address("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5") // @test1
14)
15
16var dao *pcommondao.CommonDAO
17
18func init() {
19 // Invite a user to be able to start creating DAOs
20 testing.SetRealm(testing.NewUserRealm(owner))
21 commondao.Invite(cross, user)
22
23 // Create a new DAO which gives ownership to `test`
24 testing.SetRealm(testing.NewUserRealm(user))
25 testing.SetRealm(testing.NewCodeRealm("gno.land/r/test"))
26 dao = commondao.New(cross, "Foo")
27
28 // Configure DAO
29 dao.Members().Add(user)
30}
31
32func main() {
33 testing.SetRealm(testing.NewUserRealm(user))
34
35 commondao.Execute(cross, dao.ID(), 404)
36}
37
38// Error:
39// proposal not found