From 63caca33bea70828c10f3ac1e027990a0536a8b2 Mon Sep 17 00:00:00 2001 From: Jack May Date: Tue, 16 Oct 2018 17:16:52 -0700 Subject: [PATCH] SystemProgram test was failing due to expected panic --- src/system_program.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/system_program.rs b/src/system_program.rs index 96d2b64bb0..6667bf1f46 100644 --- a/src/system_program.rs +++ b/src/system_program.rs @@ -141,7 +141,6 @@ mod test { } #[test] - #[ignore] fn test_create_spend_wrong_source() { let from = Keypair::new(); let to = Keypair::new(); @@ -149,7 +148,9 @@ mod test { accounts[0].tokens = 1; accounts[0].program_id = from.pubkey(); let tx = Transaction::system_new(&from, to.pubkey(), 1, Hash::default()); - process_transaction(&tx, &mut accounts).unwrap(); + if let Ok(()) = process_transaction(&tx, &mut accounts) { + panic!("Account not owned by SystemProgram"); + } assert_eq!(accounts[0].tokens, 1); assert_eq!(accounts[1].tokens, 0); }