Missed database check in

main
Joey Hines 2021-10-17 12:25:47 -06:00
parent c57738349b
commit 9224edca65
No known key found for this signature in database
GPG Key ID: 80F567B5C968F91B
1 changed files with 6 additions and 6 deletions

View File

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