Skip to content

Commit

Permalink
Messages tests fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Mircea <[email protected]>
  • Loading branch information
bobozaur committed Sep 8, 2023
1 parent 334e353 commit f891840
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mod tests {
let recipient_keys = vec!["test_recipient_key".to_owned()];
let service_endpoint = Url::parse("https://dummy.dummy/dummy").unwrap();

let content = PairwiseInvitationContent::builder()
let content = InvitationContent::builder_pairwise()
.label(label.to_owned())
.recipient_keys(recipient_keys.clone())
.service_endpoint(service_endpoint.clone())
Expand All @@ -75,7 +75,7 @@ mod tests {
let routing_keys = vec!["test_routing_key".to_owned()];
let service_endpoint = Url::parse("https://dummy.dummy/dummy").unwrap();

let content = PairwiseInvitationContent::builder()
let content = InvitationContent::builder_pairwise()
.label(label.to_owned())
.recipient_keys(recipient_keys.clone())
.routing_keys(routing_keys.clone())
Expand All @@ -99,9 +99,9 @@ mod tests {
fn test_minimal_conn_invite_pw_did() {
let label = "test_pw_invite_label";
let recipient_keys = vec!["test_recipient_key".to_owned()];
let service_endpoint = "https://dummy.dummy/dummy";
let service_endpoint = "did:sov:123456789abcdefghi1234";

let content = PairwiseDidInvitationContent::builder()
let content = InvitationContent::builder_pairwise_did()
.label(label.to_owned())
.recipient_keys(recipient_keys.clone())
.service_endpoint(service_endpoint.to_owned())
Expand All @@ -124,9 +124,9 @@ mod tests {
let label = "test_pw_invite_label";
let recipient_keys = vec!["test_recipient_key".to_owned()];
let routing_keys = vec!["test_routing_key".to_owned()];
let service_endpoint = "https://dummy.dummy/dummy";
let service_endpoint = "did:sov:123456789abcdefghi1234";

let content = PairwiseDidInvitationContent::builder()
let content = InvitationContent::builder_pairwise_did()
.label(label.to_owned())
.recipient_keys(recipient_keys.clone())
.routing_keys(routing_keys.clone())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mod tests {
let label = "test_label";
let did = "test_did";

let content = PublicInvitationContent::builder()
let content = InvitationContent::builder_public()
.label(label.to_owned())
.did(did.to_owned())
.build();
Expand All @@ -47,19 +47,19 @@ mod tests {
let label = "test_label";
let did = "test_did";

let content = PublicInvitationContent::builder()
let content = InvitationContent::builder_public()
.label(label.to_owned())
.did(did.to_owned())
.build();

let decorators = InvitationDecorators::builder().timing(make_extended_timing()).build();

let expected = json!({
"label": label,
"did": did
"did": did,
"~timing": decorators.timing
});

let mut decorators = InvitationDecorators::default();
decorators.timing = Some(make_extended_timing());

test_utils::test_msg(content, decorators, ConnectionTypeV1_0::Invitation, expected);
}
}

0 comments on commit f891840

Please sign in to comment.