@@ -1147,9 +1147,6 @@ fn test_finalize_succeeds() {
11471147 amount
11481148 ) ) ;
11491149
1150- // run some more blocks past the end of the contribution period
1151- run_to_block ( 60 ) ;
1152-
11531150 // finalize the crowdloan
11541151 assert_ok ! ( Crowdloan :: finalize(
11551152 RuntimeOrigin :: signed( creator) ,
@@ -1340,54 +1337,6 @@ fn test_finalize_fails_if_not_creator_origin() {
13401337 } ) ;
13411338}
13421339
1343- #[ test]
1344- fn test_finalize_fails_if_crowdloan_has_not_ended ( ) {
1345- TestState :: default ( )
1346- . with_balance ( U256 :: from ( 1 ) , 100 )
1347- . with_balance ( U256 :: from ( 2 ) , 100 )
1348- . build_and_execute ( || {
1349- // create a crowdloan
1350- let creator: AccountOf < Test > = U256 :: from ( 1 ) ;
1351- let deposit: BalanceOf < Test > = 50 ;
1352- let min_contribution: BalanceOf < Test > = 10 ;
1353- let cap: BalanceOf < Test > = 100 ;
1354- let end: BlockNumberFor < Test > = 50 ;
1355-
1356- assert_ok ! ( Crowdloan :: create(
1357- RuntimeOrigin :: signed( creator) ,
1358- deposit,
1359- min_contribution,
1360- cap,
1361- end,
1362- Some ( noop_call( ) ) ,
1363- None ,
1364- ) ) ;
1365-
1366- // run some blocks
1367- run_to_block ( 10 ) ;
1368-
1369- // some contribution
1370- let crowdloan_id: CrowdloanId = 0 ;
1371- let contributor: AccountOf < Test > = U256 :: from ( 2 ) ;
1372- let amount: BalanceOf < Test > = 50 ;
1373-
1374- assert_ok ! ( Crowdloan :: contribute(
1375- RuntimeOrigin :: signed( contributor) ,
1376- crowdloan_id,
1377- amount
1378- ) ) ;
1379-
1380- // run some more blocks before end of contribution period
1381- run_to_block ( 10 ) ;
1382-
1383- // try to finalize
1384- assert_err ! (
1385- Crowdloan :: finalize( RuntimeOrigin :: signed( creator) , crowdloan_id) ,
1386- pallet_crowdloan:: Error :: <Test >:: ContributionPeriodNotEnded
1387- ) ;
1388- } ) ;
1389- }
1390-
13911340#[ test]
13921341fn test_finalize_fails_if_crowdloan_cap_is_not_raised ( ) {
13931342 TestState :: default ( )
0 commit comments