diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2022-06-11 18:15:38 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2022-06-11 18:15:38 +0200 |
commit | 6a31a30b98f7febe9ac0db74211ef074aefc7ad3 (patch) | |
tree | 9ce8694f0f37efcc5b1eb72d9e2d26731ad7ec6a /tests | |
parent | 96c2cbe1850f95806cccb6f47a7739eb9c2ac860 (diff) | |
download | macroblog.rs-6a31a30b98f7febe9ac0db74211ef074aefc7ad3.tar.gz macroblog.rs-6a31a30b98f7febe9ac0db74211ef074aefc7ad3.tar.bz2 macroblog.rs-6a31a30b98f7febe9ac0db74211ef074aefc7ad3.zip |
feat: Add project tab
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_router.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_router.rs b/tests/test_router.rs index cfd4c32..97f344c 100644 --- a/tests/test_router.rs +++ b/tests/test_router.rs @@ -5,15 +5,28 @@ fn test_router_new_posts() { match Router::new("/posts/2021-12-26Enable_NFS_on_K3S.md") { Router::NotFound => assert!(false, "Wrong type parse"), Router::Index => assert!(false, "Wrong type parse"), + Router::Projects => assert!(false, "Wrong type parse"), Router::Post { page } => assert_eq!(page, "2021-12-26Enable_NFS_on_K3S.md".to_string()), }; } + +#[test] +fn test_router_projects() { + match Router::new("/projects") { + Router::NotFound => assert!(false, "Wrong type parse"), + Router::Index => assert!(false, "Wrong type parse"), + Router::Projects => assert!(true), + Router::Post { page: _ } => assert!(false, "Wrong type parse"), + }; +} + #[test] fn test_router_new_index() { match Router::new("/") { Router::Index => assert!(true), Router::NotFound => assert!(false, "Wrong type parse"), + Router::Projects => assert!(false, "Wrong type parse"), Router::Post { page: _ } => assert!(false, "Wrong type parse"), }; } @@ -23,6 +36,7 @@ fn test_router_new_not_found() { match Router::new("/not_found") { Router::NotFound => assert!(true), Router::Index => assert!(false, "Wrong type parse"), + Router::Projects => assert!(false, "Wrong type parse"), Router::Post { page: _ } => assert!(false, "Wrong type parse"), }; } @@ -32,6 +46,7 @@ fn test_router_new_not_found_matching_regex() { match Router::new("/posts/2021-12-03Enable_NFS_on_K3S.html") { Router::NotFound => assert!(true), Router::Index => assert!(false, "Wrong type parse"), + Router::Projects => assert!(false, "Wrong type parse"), Router::Post { page: _ } => assert!(false, "Wrong type parse"), }; } |