zp_3_d_filetest.gno
0.65 Kb · 33 lines
1package main
2
3import (
4 "testing"
5
6 "gno.land/r/nt/commondao/v0"
7)
8
9const (
10 owner = address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
11 user = address("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5") // @test1
12)
13
14var daoID uint64
15
16func init() {
17 testing.SetRealm(testing.NewUserRealm(owner))
18 commondao.Invite(cross, user)
19
20 testing.SetRealm(testing.NewUserRealm(user))
21 testing.SetRealm(testing.NewCodeRealm("gno.land/r/demo/test"))
22 daoID = commondao.New(cross, "Foo").ID()
23
24 options := commondao.GetOptions(daoID)
25 options.SetAllowDissolutionProposals(false)
26}
27
28func main() {
29 commondao.CreateDissolutionProposal(cross, daoID)
30}
31
32// Error:
33// forbidden