mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 07:25:41 +00:00
core-fellowship: allow infinite demotion period (#2828)
This commit is contained in:
@@ -306,6 +306,28 @@ fn offboard_works() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infinite_demotion_period_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let params = ParamsType {
|
||||
active_salary: [10; 9],
|
||||
passive_salary: [10; 9],
|
||||
min_promotion_period: [10; 9],
|
||||
demotion_period: [0; 9],
|
||||
offboard_timeout: 0,
|
||||
};
|
||||
assert_ok!(CoreFellowship::set_params(signed(1), Box::new(params)));
|
||||
|
||||
set_rank(0, 0);
|
||||
assert_ok!(CoreFellowship::import(signed(0)));
|
||||
set_rank(1, 1);
|
||||
assert_ok!(CoreFellowship::import(signed(1)));
|
||||
|
||||
assert_noop!(CoreFellowship::bump(signed(0), 0), Error::<Test>::NothingDoing);
|
||||
assert_noop!(CoreFellowship::bump(signed(0), 1), Error::<Test>::NothingDoing);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn proof_postpones_auto_demote() {
|
||||
new_test_ext().execute_with(|| {
|
||||
|
||||
Reference in New Issue
Block a user