From c8887513b4f16a04bd597494c62304efac63b004 Mon Sep 17 00:00:00 2001 From: Skyler Lipthay Date: Fri, 1 May 2015 02:19:05 -0700 Subject: [PATCH] fix(lib): Fix `delete` test to respect other tests Previous to this fix: if `delete` runs before `select` or `update`, `select` or `update` will fail. --- tests/tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tests.rs b/tests/tests.rs index e0d91a5..9f616f9 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -175,10 +175,10 @@ fn delete() { let cn = pool.get().unwrap(); setup_tables(&*cn); - let mut anakin = (query_model!( - &Jedi::table().select_all().where_(Jedi::name_f().is("Anakin Skywalker".to_string())).first(), + let mut darth = (query_model!( + &Jedi::table().select_all().where_(Jedi::name_f().is("Darth Maul".to_string())).first(), &*cn, &[] )).unwrap(); - assert_eq!(exec_pg!(&anakin.delete_query(), &*cn, &[]), 1); + assert_eq!(exec_pg!(&darth.delete_query(), &*cn, &[]), 1); }