From 63af175dc725c009f63717f6af112645da4792c7 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Thu, 26 Dec 2019 21:01:11 +0800 Subject: [PATCH] update: test --- srml/im-online/src/tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/srml/im-online/src/tests.rs b/srml/im-online/src/tests.rs index eef4a2308..609cd4c51 100644 --- a/srml/im-online/src/tests.rs +++ b/srml/im-online/src/tests.rs @@ -27,11 +27,15 @@ use support::{assert_noop, dispatch}; #[test] fn test_unresponsiveness_slash_fraction() { - // A single case of unresponsiveness is not slashed. + // 1 ~ 2 offline should be punished 0.3%. assert_eq!( UnresponsivenessOffence::<()>::slash_fraction(1, 50), Perbill::from_parts(3000000), // 0.3% ); + assert_eq!( + UnresponsivenessOffence::<()>::slash_fraction(2, 50), + Perbill::from_parts(3000000), // 0.3% + ); assert_eq!( UnresponsivenessOffence::<()>::slash_fraction(3, 50),