(tests: Vec<ValidatorTest<V>>)
| 2901 | } |
| 2902 | |
| 2903 | async fn run_tests<V>(tests: Vec<ValidatorTest<V>>) |
| 2904 | where |
| 2905 | V: Validator + Sync, |
| 2906 | { |
| 2907 | println!("Running tests"); |
| 2908 | for (i, tst) in tests.iter().enumerate() { |
| 2909 | for (j, v) in tst.validators.iter().enumerate() { |
| 2910 | assert_eq!( |
| 2911 | tst.ok, |
| 2912 | v.validate(&tst.id).await.is_ok(), |
| 2913 | "Test {}, assertion {}", |
| 2914 | i, |
| 2915 | j |
| 2916 | ); |
| 2917 | } |
| 2918 | } |
| 2919 | } |
| 2920 | |
| 2921 | #[tokio::test] |
| 2922 | async fn validate_is_admin() { |
no test coverage detected