@@ -198,31 +198,35 @@ describe('Governor', function () {
198
198
} ) ;
199
199
200
200
describe ( 'vote with signature' , function ( ) {
201
- it ( 'votes with an EOA signature' , async function ( ) {
201
+ it ( 'votes with an EOA signature on two proposals ' , async function ( ) {
202
202
await this . token . connect ( this . voter1 ) . delegate ( this . userEOA ) ;
203
203
204
- const nonce = await this . mock . nonces ( this . userEOA ) ;
205
-
206
- // Run proposal
207
- await this . helper . propose ( ) ;
208
- await this . helper . waitForSnapshot ( ) ;
209
- await expect (
210
- this . helper . vote ( {
211
- support : VoteType . For ,
212
- voter : this . userEOA . address ,
213
- nonce,
214
- signature : signBallot ( this . userEOA ) ,
215
- } ) ,
216
- )
217
- . to . emit ( this . mock , 'VoteCast' )
218
- . withArgs ( this . userEOA , this . proposal . id , VoteType . For , ethers . parseEther ( '10' ) , '' ) ;
219
-
220
- await this . helper . waitForDeadline ( ) ;
221
- await this . helper . execute ( ) ;
204
+ for ( let i = 0 ; i < 2 ; i ++ ) {
205
+ const nonce = await this . mock . nonces ( this . userEOA ) ;
222
206
223
- // After
224
- expect ( await this . mock . hasVoted ( this . proposal . id , this . userEOA ) ) . to . be . true ;
225
- expect ( await this . mock . nonces ( this . userEOA ) ) . to . equal ( nonce + 1n ) ;
207
+ // Run proposal
208
+ await this . helper . propose ( ) ;
209
+ await this . helper . waitForSnapshot ( ) ;
210
+ await expect (
211
+ this . helper . vote ( {
212
+ support : VoteType . For ,
213
+ voter : this . userEOA . address ,
214
+ nonce,
215
+ signature : signBallot ( this . userEOA ) ,
216
+ } ) ,
217
+ )
218
+ . to . emit ( this . mock , 'VoteCast' )
219
+ . withArgs ( this . userEOA , this . proposal . id , VoteType . For , ethers . parseEther ( '10' ) , '' ) ;
220
+
221
+ // After
222
+ expect ( await this . mock . hasVoted ( this . proposal . id , this . userEOA ) ) . to . be . true ;
223
+ expect ( await this . mock . nonces ( this . userEOA ) ) . to . equal ( nonce + 1n ) ;
224
+
225
+ // Update proposal to allow for re-propose
226
+ this . helper . description += ' - updated' ;
227
+ }
228
+
229
+ await expect ( this . mock . nonces ( this . userEOA ) ) . to . eventually . equal ( 2n ) ;
226
230
} ) ;
227
231
228
232
it ( 'votes with a valid EIP-1271 signature' , async function ( ) {
0 commit comments