Search Apps Documentation Source Content File Folder Download Copy Actions Download

fee_collector_test.gno

0.68 Kb ยท 37 lines
 1package params
 2
 3import (
 4	"testing"
 5
 6	"gno.land/p/nt/urequire"
 7	"gno.land/r/gov/dao"
 8)
 9
10func TestSetFeeCollector(t *testing.T) {
11	userRealm := testing.NewUserRealm(g1user)
12	testing.SetRealm(userRealm)
13
14	pr := NewSetFeeCollectorRequest(userRealm.Address())
15	id := dao.MustCreateProposal(cross, pr)
16	_, err := dao.GetProposal(cross, id)
17	urequire.NoError(t, err)
18
19	urequire.NotPanics(
20		t,
21		func() {
22			dao.MustVoteOnProposal(cross, dao.VoteRequest{
23				Option:     dao.YesVote,
24				ProposalID: dao.ProposalID(id),
25			})
26		},
27	)
28
29	urequire.NotPanics(
30		t,
31		func() {
32			dao.ExecuteProposal(cross, id)
33		},
34	)
35
36	// XXX: test that the value got properly updated, when we can get params from gno code
37}