forked from groche97/mini_admin_bot
start the refactor
This commit is contained in:
12
tests/permissions.rs
Normal file
12
tests/permissions.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use mini_admin_bot::check_permissions;
|
||||
use mockall::{automock, mock, predicate::*};
|
||||
|
||||
#[test]
|
||||
fn test_permissions() {
|
||||
let mut mock = check_permissions::MockGroupPermissions::new();
|
||||
mock.expect_compare()
|
||||
.with("user_id")
|
||||
.times(1)
|
||||
.returning(true);
|
||||
assert_eq!(true, mock.compare("user_id"));
|
||||
}
|
||||
Reference in New Issue
Block a user