@@ -198,6 +198,43 @@ spoAndCCVotingSpec = do
198198        else  do 
199199          getLastEnactedParameterChange `shouldReturn`  SNothing 
200200          newRefScriptBaseFee `shouldBe`  initialRefScriptBaseFee
201+     it " Constitution cannot be changed if active committee size is below min size" .  whenPostBootstrap $  do 
202+       modifyPParams $  \ pp -> 
203+         pp
204+           &  ppDRepVotingThresholdsL .  dvtUpdateToConstitutionL .~  (0  %!  1 )
205+           &  ppCommitteeMinSizeL .~  2 
206+           &  ppCommitteeMaxTermLengthL .~  EpochInterval  50 
207+       coldCommitteeActive <-  KeyHashObj  <$>  freshKeyHash
208+       coldCommitteeInactive <-  KeyHashObj  <$>  freshKeyHash
209+       startingEpoch <-  getsNES nesELL
210+       maxTermLength <-  getsPParams ppCommitteeMaxTermLengthL
211+       (dRep, _, _) <-  setupSingleDRep 1_000_000_000 
212+       (spo, _, _) <-  setupPoolWithStake $  Coin  1_000_000_000 
213+       let 
214+         committeeMap = 
215+           [ (coldCommitteeActive, addEpochInterval startingEpoch maxTermLength)
216+           , (coldCommitteeInactive, addEpochInterval startingEpoch $  EpochInterval  5 )
217+           ]
218+       initialCommittee <-  getCommitteeMembers
219+       committeeActionId <- 
220+         impAnn " Submit committee update" 
221+           .  submitGovAction
222+           $  UpdateCommittee 
223+             SNothing 
224+             initialCommittee
225+             committeeMap
226+             (0  %!  1 )
227+       submitYesVote_ (DRepVoter  dRep) committeeActionId
228+       submitYesVote_ (StakePoolVoter  spo) committeeActionId
229+       passNEpochs 2 
230+       getCommitteeMembers `shouldReturn`  Map. keysSet committeeMap
231+       passNEpochs 3 
232+       newConstitution <-  arbitrary
233+       constitutionActionId <-  submitGovAction $  NewConstitution  SNothing  newConstitution
234+       logRatificationChecks constitutionActionId
235+       passNEpochs 2 
236+       getConstitution `shouldNotReturn`  newConstitution
237+       True `shouldBe`  False 
201238
202239committeeExpiryResignationDiscountSpec  :: 
203240  forall  era . 
0 commit comments