|
@@ -115,14 +115,17 @@ fn add_opening_fails_with_zero_reward() {
|
|
|
fn add_opening_fails_with_insufficient_balance() {
|
|
|
build_test_externalities().execute_with(|| {
|
|
|
HireLeadFixture::default()
|
|
|
- .with_initial_balance(<Test as Trait>::MinimumApplicationStake::get() + 1)
|
|
|
+ .with_initial_balance(<Test as Trait>::MinimumApplicationStake::get())
|
|
|
.hire_lead();
|
|
|
|
|
|
- let add_opening_fixture = AddOpeningFixture::default();
|
|
|
+ let add_opening_fixture = AddOpeningFixture::default().with_stake_policy(StakePolicy {
|
|
|
+ stake_amount: <Test as Trait>::MinimumApplicationStake::get() + 1,
|
|
|
+ leaving_unstaking_period: <Test as Trait>::MinUnstakingPeriodLimit::get() + 1,
|
|
|
+ });
|
|
|
|
|
|
- add_opening_fixture.call_and_assert(Err(
|
|
|
- Error::<Test, DefaultInstance>::InsufficientBalanceToCoverStake.into(),
|
|
|
- ));
|
|
|
+ add_opening_fixture.call_and_assert(Err(DispatchError::Other(
|
|
|
+ "Not enough balance for a new stake.",
|
|
|
+ )));
|
|
|
});
|
|
|
}
|
|
|
|