use jmap_sharing::types::{JMAP_PRINCIPALS_URI, PrincipalsCapability};
#[test]
fn types_are_always_there() {
assert_eq!(JMAP_PRINCIPALS_URI, "urn:ietf:params:jmap:principals");
let cap: PrincipalsCapability =
serde_json::from_str(r#"{"currentUserPrincipalId": "P1"}"#).unwrap();
assert!(cap.current_user_principal_id.is_some());
}
#[cfg(feature = "client")]
#[test]
fn client_is_reexported() {
fn _takes<T: jmap_sharing::client::JmapSharingExt>(_: &T) {}
}
#[cfg(feature = "server")]
#[test]
fn server_is_reexported() {
fn _takes<B: jmap_sharing::server::SharingBackend>(_: &B) {}
}
#[cfg(feature = "memory")]
#[test]
fn memory_backend_is_reexported() {
fn implements<B: jmap_sharing::server::SharingBackend>(_: &B) {}
implements(&jmap_sharing::server::memory::MemoryBackend::new());
}