test contact adding and modifying

This commit is contained in:
B. Petersen
2019-11-13 22:50:08 +01:00
committed by holger krekel
parent b6095e29d7
commit 5796c28391
2 changed files with 102 additions and 16 deletions

View File

@@ -261,22 +261,6 @@ fn test_stress_tests() {
}
}
#[test]
fn test_get_contacts() {
let context = create_test_context();
let contacts = Contact::get_all(&context.ctx, 0, Some("some2")).unwrap();
assert_eq!(contacts.len(), 0);
let id = Contact::create(&context.ctx, "bob", "bob@mail.de").unwrap();
assert_ne!(id, 0);
let contacts = Contact::get_all(&context.ctx, 0, Some("bob")).unwrap();
assert_eq!(contacts.len(), 1);
let contacts = Contact::get_all(&context.ctx, 0, Some("alice")).unwrap();
assert_eq!(contacts.len(), 0);
}
#[test]
fn test_chat() {
let context = create_test_context();