Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added RFC links for tests #78

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions jose-jwk/tests/jwk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ mod rfc7517 {
use jose_jwa::Signing;
use jose_jwk::*;

/// From https://datatracker.ietf.org/doc/html/rfc7517#appendix-A.1
#[test]
fn a1() {
let val = serde_json::json!({
Expand Down Expand Up @@ -106,6 +107,7 @@ mod rfc7517 {
}
}

/// From https://datatracker.ietf.org/doc/html/rfc7517#appendix-A.2
#[test]
fn a2() {
let val = serde_json::json!({
Expand Down Expand Up @@ -312,6 +314,7 @@ mod rfc7517 {
}
}

/// From https://datatracker.ietf.org/doc/html/rfc7517#appendix-B
#[test]
fn b() {
let val = serde_json::json!({
Expand Down Expand Up @@ -421,6 +424,7 @@ mod rfc7517 {
mod rfc8037 {
use jose_jwk::*;

/// From https://datatracker.ietf.org/doc/html/rfc8037#appendix-A.1
#[test]
fn a1() {
let val = serde_json::json!({
Expand Down Expand Up @@ -453,6 +457,7 @@ mod rfc8037 {
assert_eq!(val, serde_json::to_value(jwk).unwrap());
}

/// From https://datatracker.ietf.org/doc/html/rfc8037#appendix-A.2
#[test]
fn a2() {
let val = serde_json::json!({
Expand All @@ -478,6 +483,7 @@ mod rfc8037 {
assert_eq!(val, serde_json::to_value(jwk).unwrap());
}

/// From https://datatracker.ietf.org/doc/html/rfc8037#appendix-A.6
#[test]
fn a6() {
let val = serde_json::json!({
Expand Down Expand Up @@ -507,6 +513,7 @@ mod rfc8037 {
assert_eq!(val, serde_json::to_value(jwk).unwrap());
}

/// From https://datatracker.ietf.org/doc/html/rfc8037#appendix-A.7
#[test]
fn a7() {
let val = serde_json::json!({
Expand Down