diff --git a/src/login/character.rs b/src/login/character.rs index ad026ee..ca4e65c 100644 --- a/src/login/character.rs +++ b/src/login/character.rs @@ -532,7 +532,7 @@ mod test { id: 3, username: "hi3".to_string(), password: bcrypt::hash("qwer", 5).unwrap(), - guildcard: Some(3u32), + guildcard: Some(3), team_id: None, banned: false, muted_until: SystemTime::now(), @@ -543,6 +543,7 @@ mod test { let mut server = CharacterServerState::new(TestData.clone()); server.clients.insert(ClientId(1), fake_user.clone()); let mut send = server.handle(ClientId(1), &RecvCharacterPacket::SetFlag(SetFlag {flags: 1})).unwrap().collect::>(); + assert!(TestData.get_user_by_id(3).unwrap().flags == 1); send = server.handle(ClientId(1), &RecvCharacterPacket::CharacterPreview(CharacterPreview {slot: 1, character: character::SelectScreenCharacter { exp: 0, level: 0, @@ -572,7 +573,7 @@ mod test { } })).unwrap().collect::>(); assert!(send.len() == 2); - let chars = TestData.get_characters_by_user(&fake_user.user.clone().unwrap()); + let chars = TestData.get_characters_by_user(&fake_user.user.unwrap()); assert!(chars[1].unwrap().character.name == [9, 69, 116, 101, 115, 116, 32, 110, 97, 109, 101, 0, 0, 0, 0, 0]); assert!(chars[0].is_none()); }