Skip to content

Commit 7faf45a

Browse files
committed
fix test
1 parent 4cbf1a4 commit 7faf45a

File tree

1 file changed

+8
-8
lines changed
  • rust/signed_doc/src/metadata/document_refs

1 file changed

+8
-8
lines changed

rust/signed_doc/src/metadata/document_refs/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,15 @@ pub(crate) mod tests {
279279

280280
#[test_case(
281281
CompatibilityPolicy::Accept,
282-
|uuid: UuidV7, doc_loc: DocLocator| {
282+
|id, ver, doc_loc| {
283283
let mut e = Encoder::new(Vec::new());
284284
e.array(1)
285285
.unwrap()
286286
.array(3)
287287
.unwrap()
288-
.encode_with(uuid, &mut CborContext::Tagged)
288+
.encode_with(id, &mut CborContext::Tagged)
289289
.unwrap()
290-
.encode_with(uuid, &mut CborContext::Tagged)
290+
.encode_with(ver, &mut CborContext::Tagged)
291291
.unwrap()
292292
.encode(doc_loc)
293293
.unwrap();
@@ -297,15 +297,15 @@ pub(crate) mod tests {
297297
)]
298298
#[test_case(
299299
CompatibilityPolicy::Fail,
300-
|uuid: UuidV7, doc_loc: DocLocator| {
300+
|id, ver, doc_loc| {
301301
let mut e = Encoder::new(Vec::new());
302302
e.array(1)
303303
.unwrap()
304304
.array(3)
305305
.unwrap()
306-
.encode_with(uuid, &mut CborContext::Tagged)
306+
.encode_with(id, &mut CborContext::Tagged)
307307
.unwrap()
308-
.encode_with(uuid, &mut CborContext::Tagged)
308+
.encode_with(ver, &mut CborContext::Tagged)
309309
.unwrap()
310310
.encode(doc_loc)
311311
.unwrap();
@@ -315,10 +315,10 @@ pub(crate) mod tests {
315315
)]
316316
fn test_valid_cbor_decode(
317317
mut policy: CompatibilityPolicy,
318-
e_gen: impl FnOnce(UuidV7, DocLocator) -> Encoder<Vec<u8>>,
318+
e_gen: impl FnOnce(UuidV7, UuidV7, DocLocator) -> Encoder<Vec<u8>>,
319319
) {
320320
let doc_ref = create_dummy_doc_ref();
321-
let e = e_gen(*doc_ref.id(), doc_ref.doc_locator().clone());
321+
let e = e_gen(*doc_ref.id(), *doc_ref.ver(), doc_ref.doc_locator().clone());
322322

323323
let doc_refs =
324324
DocumentRefs::decode(&mut Decoder::new(e.into_writer().as_slice()), &mut policy)

0 commit comments

Comments
 (0)