diff --git a/contract/src/common/mod.rs b/contract/src/common/mod.rs index ae2660a..f781df1 100644 --- a/contract/src/common/mod.rs +++ b/contract/src/common/mod.rs @@ -25,7 +25,5 @@ fn convert_milliseconds_to_unix_timestamp_successfully() { #[should_panic(expected = "Failed to get convert milliseconds to Unix timestamp")] fn convert_milliseconds_to_unix_timestamp_with_unsuccessfully() { let millis: u64 = u64::MAX; - let timestamp = ms_timestamp_to_seconds(millis); - - assert_eq!(1_699_038_575, timestamp); + let _timestamp = ms_timestamp_to_seconds(millis); } diff --git a/contract/src/record/tests.rs b/contract/src/record/tests.rs index 8e6d05d..70ff728 100644 --- a/contract/src/record/tests.rs +++ b/contract/src/record/tests.rs @@ -34,6 +34,15 @@ fn record_by_oracle() { assert_eq!(bob_balance, bob_actual_balance.0); } +#[test] +#[should_panic(expected = "Unauthorized access! Only oracle can do this!")] +fn record_by_not_oracle() { + let (_context, mut contract, accounts) = Context::init_with_oracle(); + + let alice_balance_1 = 1_000_000; + contract.record_batch_for_hold(vec![(accounts.alice.clone(), U128(alice_balance_1))]); +} + #[test] #[should_panic(expected = "Record for this timestamp: 0 already existed. It was overwritten.")] fn test_record() {