Missed database check in
parent
c57738349b
commit
9224edca65
|
@ -125,7 +125,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_insert() {
|
||||
let player = Player::new("CoolZero123", UserID::DiscordUUID {discord_uuid: 0u64});
|
||||
let player = Player::new("CoolZero123", UserID::DiscordUUID { discord_uuid: 0u64 });
|
||||
|
||||
let p2 = DB.insert::<Player>(player.clone()).unwrap();
|
||||
|
||||
|
@ -137,8 +137,8 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_unique_insert() {
|
||||
let player1 = Player::new("CoolZero123", UserID::DiscordUUID {discord_uuid: 0u64});
|
||||
let player2 = Player::new("CoolZero123", UserID::DiscordUUID {discord_uuid: 0u64});
|
||||
let player1 = Player::new("CoolZero123", UserID::DiscordUUID { discord_uuid: 0u64 });
|
||||
let player2 = Player::new("CoolZero123", UserID::DiscordUUID { discord_uuid: 0u64 });
|
||||
|
||||
DB.insert::<Player>(player1.clone()).unwrap();
|
||||
assert_eq!(DB.insert::<Player>(player2.clone()).is_err(), true);
|
||||
|
@ -148,7 +148,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_get() {
|
||||
let player = Player::new("CoolZero123", UserID::DiscordUUID {discord_uuid: 0u64});
|
||||
let player = Player::new("CoolZero123", UserID::DiscordUUID { discord_uuid: 0u64 });
|
||||
|
||||
let p2 = DB.insert::<Player>(player.clone()).unwrap();
|
||||
|
||||
|
@ -160,7 +160,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_filter() {
|
||||
let player = Player::new("CoolZero123", UserID::DiscordUUID {discord_uuid: 0u64});
|
||||
let player = Player::new("CoolZero123", UserID::DiscordUUID { discord_uuid: 0u64 });
|
||||
let player = DB.insert::<Player>(player.clone()).unwrap();
|
||||
let loc = Location::new(
|
||||
"Test Shop",
|
||||
|
@ -190,7 +190,7 @@ mod tests {
|
|||
let insert_count = 1000;
|
||||
let timer = Instant::now();
|
||||
for i in 0..insert_count {
|
||||
let player = Player::new("test", UserID::DiscordUUID {discord_uuid: i});
|
||||
let player = Player::new("test", UserID::DiscordUUID { discord_uuid: i });
|
||||
|
||||
DB.insert::<Player>(player).unwrap();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue