diff --git a/internal/crypto/src/tests/time_stamp/response.rs b/internal/crypto/src/tests/time_stamp/response.rs index 8177cf2e..33d1834b 100644 --- a/internal/crypto/src/tests/time_stamp/response.rs +++ b/internal/crypto/src/tests/time_stamp/response.rs @@ -14,7 +14,10 @@ #[cfg(target_arch = "wasm32")] use wasm_bindgen_test::wasm_bindgen_test; -use crate::{asn1::rfc5652::CmsVersion, time_stamp::TimeStampResponse}; +use crate::{ + asn1::{rfc3161::PkiStatus, rfc5652::CmsVersion}, + time_stamp::TimeStampResponse, +}; #[test] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)] @@ -43,3 +46,13 @@ fn impl_debug() { let x = format!("{tsr:?}"); assert!(!x.is_empty()); } + +#[test] +#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)] +fn impl_deref() { + let tsr = include_bytes!("../fixtures/time_stamp/video1.ts.bin"); + let tsr = TimeStampResponse::parse(tsr).unwrap(); + + let tsr = &*tsr; + assert_eq!(tsr.status.status, PkiStatus::Granted); +}