File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -6170,6 +6170,41 @@ describe("BondingManager", () => {
61706170 )
61716171 } )
61726172
6173+ it ( "should fail if system is paused" , async ( ) => {
6174+ await bondingManager
6175+ . connect ( transcoder )
6176+ . setRewardCaller ( nonTranscoder . address )
6177+
6178+ await fixture . controller . pause ( )
6179+ const setRewardCallerTx = bondingManager
6180+ . connect ( transcoder )
6181+ . setRewardCaller ( nonTranscoder . address )
6182+ await expect ( setRewardCallerTx ) . to . be . revertedWith (
6183+ "system is paused"
6184+ )
6185+
6186+ const rewardTx = bondingManager
6187+ . connect ( nonTranscoder )
6188+ . rewardForTranscoder ( transcoder . address )
6189+ await expect ( rewardTx ) . to . be . revertedWith ( "system is paused" )
6190+ } )
6191+
6192+ it ( "should fail if current round is not initialized" , async ( ) => {
6193+ await bondingManager
6194+ . connect ( transcoder )
6195+ . setRewardCaller ( nonTranscoder . address )
6196+ await fixture . roundsManager . setMockBool (
6197+ functionSig ( "currentRoundInitialized()" ) ,
6198+ false
6199+ )
6200+ const rewardTx = bondingManager
6201+ . connect ( nonTranscoder )
6202+ . rewardForTranscoder ( transcoder . address )
6203+ await expect ( rewardTx ) . to . be . revertedWith (
6204+ "current round is not initialized"
6205+ )
6206+ } )
6207+
61736208 it ( "should always checkpoint the reward recipient, not the RewardCaller" , async ( ) => {
61746209 await bondingManager
61756210 . connect ( transcoder )
You can’t perform that action at this time.
0 commit comments