mirror of
https://github.com/Drop-OSS/dropbreak.git
synced 2026-07-18 09:57:53 -04:00
Add tests for borrowed insert
This commit is contained in:
+10
@@ -479,6 +479,16 @@ mod test {
|
||||
assert_eq!(hello, "Hello World!");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn simple_insert_and_retrieve_borrow() {
|
||||
let tmpf = NamedTempFile::new().unwrap();
|
||||
let db = Database::open(tmpf.path()).unwrap();
|
||||
|
||||
db.insert("test", &25).unwrap();
|
||||
let hello : u32 = db.retrieve("test").unwrap();
|
||||
assert_eq!(hello, 25);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_persistence() {
|
||||
let tmpf = NamedTempFile::new().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user