Formatting.
This commit is contained in:
parent
fcec57414a
commit
470c6612de
@ -173,7 +173,10 @@ mod cache {
|
||||
let mtt = MTT::new().await;
|
||||
let id = mtt.db.add_entry(CacheEntry::Raw("same".to_string())).await;
|
||||
let expected = "different";
|
||||
mtt.db.update_entry(&id, CacheEntry::Raw(expected.to_string())).await.unwrap();
|
||||
mtt.db
|
||||
.update_entry(&id, CacheEntry::Raw(expected.to_string()))
|
||||
.await
|
||||
.unwrap();
|
||||
let output = mtt.db.get_entry(&id).await.unwrap();
|
||||
assert_eq!(output.to_string(), expected);
|
||||
}
|
||||
@ -181,7 +184,11 @@ mod cache {
|
||||
#[async_std::test]
|
||||
async fn update_bad_id() {
|
||||
let mtt = MTT::new().await;
|
||||
match mtt.db.update_entry("wilma", CacheEntry::Raw("wrong".to_string())).await {
|
||||
match mtt
|
||||
.db
|
||||
.update_entry("wilma", CacheEntry::Raw("wrong".to_string()))
|
||||
.await
|
||||
{
|
||||
Ok(_) => assert!(false, "Bad id should raise an error."),
|
||||
Err(err) => assert_eq!(err.to_string(), "cache entry not found"),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user