diff options
author | alpaylan | 2021-04-14 01:53:30 +0300 |
---|---|---|
committer | alpaylan | 2021-04-14 01:53:30 +0300 |
commit | 6a27685c253e1ea520dd903cb3db4581f3ab66f6 (patch) | |
tree | cdad63a292ed97d5800b7360bdcdfa86ab356d13 /tests | |
parent | dfe92a1f61d1d56246d1680442042deffa0ea76c (diff) | |
download | gradecoin-6a27685c253e1ea520dd903cb3db4581f3ab66f6.tar.gz gradecoin-6a27685c253e1ea520dd903cb3db4581f3ab66f6.tar.bz2 gradecoin-6a27685c253e1ea520dd903cb3db4581f3ab66f6.zip |
finished claim testing.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/schema_tests.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/schema_tests.rs b/tests/schema_tests.rs index 8b07f72..c6fae9d 100644 --- a/tests/schema_tests.rs +++ b/tests/schema_tests.rs | |||
@@ -28,7 +28,14 @@ mod tests { | |||
28 | 28 | ||
29 | #[test] | 29 | #[test] |
30 | fn claims_deserialize_correctly() { | 30 | fn claims_deserialize_correctly() { |
31 | 31 | let data = r#"{"tha":"hashed_string","iat":0,"exp":100}"#; | |
32 | let claims: Claims = serde_json::from_str(data).unwrap(); | ||
33 | let expected_claims = Claims { | ||
34 | tha: "hashed_string".to_owned(), | ||
35 | iat: 0, | ||
36 | exp: 100, | ||
37 | }; | ||
38 | assert_eq!(claims, expected_claims); | ||
32 | } | 39 | } |
33 | 40 | ||
34 | #[test] | 41 | #[test] |