Skip to content

Commit

Permalink
Corrected expected value in broken test
Browse files Browse the repository at this point in the history
Signed-off-by: artem.ivanov <[email protected]>
  • Loading branch information
Artemkaaas committed Jan 12, 2024
1 parent be65636 commit 63e7085
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/data_types/w3c/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ pub trait EncodedObject {
where
Self: Serialize,
{
let json = msg_pack::encode(self)?;
let serialized = base64::encode(json);
Ok(format!("{}{}", BASE_HEADER, serialized))
let msg_pack_encoded = msg_pack::encode(self)?;
let base64_encoded = base64::encode(msg_pack_encoded);
Ok(format!("{}{}", BASE_HEADER, base64_encoded))
}

fn decode(string: &str) -> Result<Self>
Expand Down Expand Up @@ -359,7 +359,7 @@ pub(crate) mod tests {
value: 1,
};
let encoded = obj.encode().unwrap();
assert_eq!("ueyJ0eXBlXyI6IlRlc3QiLCJ2YWx1ZSI6MX0", encoded);
assert_eq!("ugqV0eXBlX6RUZXN0pXZhbHVlAQ", encoded);
let decoded = TestObject::decode(&encoded).unwrap();
assert_eq!(obj, decoded)
}
Expand Down

0 comments on commit 63e7085

Please sign in to comment.