diff options
author | alpaylan | 2021-04-14 01:53:30 +0300 |
---|---|---|
committer | alpaylan | 2021-04-14 01:53:30 +0300 |
commit | 5060aef6f931e10286591c210e2a89b95d7ee0a0 (patch) | |
tree | 719bc55a9984c80c767f1568d9085dc8031d22c8 /tests | |
parent | 5f4f914fd12442b481f8ac1c6b6a4fd04182a6b6 (diff) | |
download | gradecoin-5060aef6f931e10286591c210e2a89b95d7ee0a0.tar.gz gradecoin-5060aef6f931e10286591c210e2a89b95d7ee0a0.tar.bz2 gradecoin-5060aef6f931e10286591c210e2a89b95d7ee0a0.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] |