Skip to content

Commit

Permalink
test: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderstabel committed Oct 7, 2024
1 parent 5ad6fd5 commit 7ee93b4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions agent_api_rest/src/issuance/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,7 @@ pub mod tests {
"name": "UniCore"
},
"issuanceDate": "2010-01-01T00:00:00Z",
"credentialSubject": {
"first_name": "Ferris",
"last_name": "Rustacean"
}
"credentialSubject": CREDENTIAL_SUBJECT.clone()
});
}

Expand All @@ -216,10 +213,8 @@ pub mod tests {
serde_json::to_vec(&json!({
"offerId": OFFER_ID,
"credential": {
"credentialSubject": {
"first_name": "Ferris",
"last_name": "Rustacean"
}},
"credentialSubject": CREDENTIAL_SUBJECT.clone()
},
"credentialConfigurationId": CREDENTIAL_CONFIGURATION_ID
}))
.unwrap(),
Expand Down Expand Up @@ -261,7 +256,7 @@ pub mod tests {

let body = axum::body::to_bytes(response.into_body(), usize::MAX).await.unwrap();
let body: Value = serde_json::from_slice(&body).unwrap();
assert_eq!(body, CREDENTIAL.clone());
assert_eq!(body["data"]["raw"], CREDENTIAL.clone());
}

#[tokio::test]
Expand Down

0 comments on commit 7ee93b4

Please sign in to comment.