@@ -1534,8 +1534,8 @@ fn test_refund_succeeds() {
15341534 . is_some_and( |c| c. contributors_count == 7 )
15351535 ) ;
15361536
1537- // run some more blocks past the end of the contribution period
1538- run_to_block ( 60 ) ;
1537+ // run some more blocks before the end of the contribution period
1538+ run_to_block ( 20 ) ;
15391539
15401540 // first round of refund
15411541 assert_ok ! ( Crowdloan :: refund(
@@ -1563,7 +1563,7 @@ fn test_refund_succeeds() {
15631563 pallet_crowdloan:: Event :: <Test >:: PartiallyRefunded { crowdloan_id } . into( )
15641564 ) ;
15651565
1566- // run some more blocks
1566+ // run some more blocks past the end of the contribution period
15671567 run_to_block ( 70 ) ;
15681568
15691569 // second round of refund
@@ -1649,39 +1649,6 @@ fn test_refund_fails_if_crowdloan_does_not_exist() {
16491649 } ) ;
16501650}
16511651
1652- #[ test]
1653- fn test_refund_fails_if_crowdloan_has_not_ended ( ) {
1654- TestState :: default ( )
1655- . with_balance ( U256 :: from ( 1 ) , 100 )
1656- . build_and_execute ( || {
1657- // create a crowdloan
1658- let creator: AccountOf < Test > = U256 :: from ( 1 ) ;
1659- let initial_deposit: BalanceOf < Test > = 50 ;
1660- let min_contribution: BalanceOf < Test > = 10 ;
1661- let cap: BalanceOf < Test > = 300 ;
1662- let end: BlockNumberFor < Test > = 50 ;
1663- assert_ok ! ( Crowdloan :: create(
1664- RuntimeOrigin :: signed( creator) ,
1665- initial_deposit,
1666- min_contribution,
1667- cap,
1668- end,
1669- Some ( noop_call( ) ) ,
1670- None ,
1671- ) ) ;
1672-
1673- // run some blocks
1674- run_to_block ( 10 ) ;
1675-
1676- // try to refund
1677- let crowdloan_id: CrowdloanId = 0 ;
1678- assert_err ! (
1679- Crowdloan :: refund( RuntimeOrigin :: signed( creator) , crowdloan_id) ,
1680- pallet_crowdloan:: Error :: <Test >:: ContributionPeriodNotEnded
1681- ) ;
1682- } ) ;
1683- }
1684-
16851652#[ test]
16861653fn test_dissolve_succeeds ( ) {
16871654 TestState :: default ( )
0 commit comments