identifiers: Feature-gate serde test under serde feature
This commit is contained in:
parent
62135a9630
commit
55c1dd5ca7
@ -137,10 +137,7 @@ impl From<EventEncryptionAlgorithm> for String {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use ruma_serde::test::serde_json_eq;
|
use super::{DeviceKeyAlgorithm, SigningKeyAlgorithm};
|
||||||
use serde_json::json;
|
|
||||||
|
|
||||||
use super::{DeviceKeyAlgorithm, EventEncryptionAlgorithm, SigningKeyAlgorithm};
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_device_key_algorithm() {
|
fn parse_device_key_algorithm() {
|
||||||
@ -155,7 +152,13 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(feature = "serde")]
|
||||||
fn event_encryption_algorithm_serde() {
|
fn event_encryption_algorithm_serde() {
|
||||||
|
use ruma_serde::test::serde_json_eq;
|
||||||
|
use serde_json::json;
|
||||||
|
|
||||||
|
use super::EventEncryptionAlgorithm;
|
||||||
|
|
||||||
serde_json_eq(EventEncryptionAlgorithm::MegolmV1AesSha2, json!("m.megolm.v1.aes-sha2"));
|
serde_json_eq(EventEncryptionAlgorithm::MegolmV1AesSha2, json!("m.megolm.v1.aes-sha2"));
|
||||||
serde_json_eq(
|
serde_json_eq(
|
||||||
EventEncryptionAlgorithm::OlmV1Curve25519AesSha2,
|
EventEncryptionAlgorithm::OlmV1Curve25519AesSha2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user