Clean up tests
This commit is contained in:
parent
e4fe60c06e
commit
32bbe8a8ce
2 changed files with 30 additions and 30 deletions
|
@ -106,10 +106,14 @@ impl State {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use crate::state::State;
|
||||||
|
use crate::state::types::ElementContent;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[serial_test::serial]
|
#[serial_test::serial]
|
||||||
async fn test_create() {
|
async fn test_create() {
|
||||||
tracing_subscriber::fmt().pretty().init();
|
tracing_subscriber::fmt().pretty().init();
|
||||||
let state = State::new().await.unwrap();
|
let state = State::new().await.unwrap();
|
||||||
let id = state.create_element(&ElementContent::Text("Test-text".to_string())).unwrap();
|
let id = state.create_element(&ElementContent::Text("Test-text".to_string())).unwrap();
|
||||||
|
@ -118,11 +122,11 @@ async fn test_create() {
|
||||||
ElementContent::Text("Test-text".to_string()),
|
ElementContent::Text("Test-text".to_string()),
|
||||||
el.content().to_owned()
|
el.content().to_owned()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[serial_test::serial]
|
#[serial_test::serial]
|
||||||
async fn test_update() {
|
async fn test_update() {
|
||||||
tracing_subscriber::fmt().pretty().init();
|
tracing_subscriber::fmt().pretty().init();
|
||||||
let state = State::new().await.unwrap();
|
let state = State::new().await.unwrap();
|
||||||
let id = state.create_element(&ElementContent::Text("Test-text".to_string())).unwrap();
|
let id = state.create_element(&ElementContent::Text("Test-text".to_string())).unwrap();
|
||||||
|
@ -132,4 +136,5 @@ async fn test_update() {
|
||||||
ElementContent::Text("Test-text 2".to_string()),
|
ElementContent::Text("Test-text 2".to_string()),
|
||||||
el.content().to_owned()
|
el.content().to_owned()
|
||||||
)
|
)
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -27,8 +27,3 @@ impl TryFrom<&str> for ElementContent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
pub fn test() {
|
|
||||||
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue