Skip to main content

assert_round_trip

Function assert_round_trip 

Source
pub fn assert_round_trip(change: &dyn VersionChange, document: &Value) -> Value
Expand description

Downgrading document and upgrading the result gives document back, so old clients can send what they receive. Not for changes that drop data, such as a removed attribute. Returns the downgraded document, for further assertions.

ยงPanics

When upgrading the downgraded document does not give it back.