From 139aca8be338cdae02d11d82ee5dc202d632c14e Mon Sep 17 00:00:00 2001 From: Rakowskiii Date: Sat, 29 Jul 2023 01:30:02 +0200 Subject: [PATCH] fix: more test coverage --- justfile | 4 ++++ tests/integration.rs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index 6a357186..f6493e87 100644 --- a/justfile +++ b/justfile @@ -20,3 +20,7 @@ commit MSG: @echo '==> Committing changes' cargo +nightly fmt && \ git commit -a -S -m "{{MSG}}" + +tarp ENV: + @echo '==> Checking test coverage' + ENVIRONMENT={{ENV}} cargo tarpaulin diff --git a/tests/integration.rs b/tests/integration.rs index c2abcafd..7495a55b 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -258,7 +258,9 @@ PROJECT_ID to be set", assert_eq!(claims.sub, sub_auth_hash); assert!(claims.iat < chrono::Utc::now().timestamp() + JWT_LEEWAY); assert!(claims.exp > chrono::Utc::now().timestamp() - JWT_LEEWAY); - // TODO: add more asserts + assert_eq!(claims.app, "https://my-test-app.com"); + assert_eq!(claims.aud, format!("did:pkh:{}", TEST_ACCOUNT)); + assert_eq!(claims.act, "notify_message"); let delete_params = json!({ "code": 400,