From 8efd11a762241e5de96c884cf069f160bfb6310a Mon Sep 17 00:00:00 2001
From: librelois <c@elo.tf>
Date: Mon, 30 May 2022 07:46:32 +0200
Subject: [PATCH] tests(wot): reproduce bug #51

---
 pallets/duniter-wot/src/tests.rs | 12 ++++++++++++
 pallets/identity/src/types.rs    |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/pallets/duniter-wot/src/tests.rs b/pallets/duniter-wot/src/tests.rs
index 42f255fa8..91690570c 100644
--- a/pallets/duniter-wot/src/tests.rs
+++ b/pallets/duniter-wot/src/tests.rs
@@ -155,6 +155,18 @@ fn test_new_idty_validation() {
                 WotDiff::AddLink(2, 6)
             ]
         );
+
+        // After PendingMembershipPeriod, Ferdie identity should not expire
+        run_to_block(6);
+        assert_eq!(
+            Identity::identity(6),
+            Some(pallet_identity::IdtyValue {
+                next_creatable_identity_on: 0,
+                owner_key: 6,
+                removable_on: 0,
+                status: IdtyStatus::Validated,
+            })
+        );
     });
 }
 
diff --git a/pallets/identity/src/types.rs b/pallets/identity/src/types.rs
index 02931d224..456cf3023 100644
--- a/pallets/identity/src/types.rs
+++ b/pallets/identity/src/types.rs
@@ -77,7 +77,7 @@ impl Default for IdtyStatus {
     }
 }
 
-#[cfg_attr(feature = "std", derive(Deserialize, Serialize))]
+#[cfg_attr(feature = "std", derive(Debug, Deserialize, Serialize))]
 #[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo)]
 pub struct IdtyValue<BlockNumber, AccountId> {
     pub next_creatable_identity_on: BlockNumber,
-- 
GitLab