Skip to content

Commit

Permalink
✅ fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Goodjooy committed Mar 3, 2024
1 parent 89fbb63 commit 620381c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sea-orm-macros/src/derives/partial_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ mod util {
#[cfg(test)]
mod test {
use quote::format_ident;
use syn::DeriveInput;
use syn::{parse_str, DeriveInput, Type};

use crate::derives::partial_model::ColumnAs;

Expand All @@ -250,11 +250,10 @@ struct PartialModel{
"#;
#[test]
fn test_load_macro_input() -> StdResult<()> {
let input = syn::parse_str::<DeriveInput>(CODE_SNIPPET)?;
let input = parse_str::<DeriveInput>(CODE_SNIPPET)?;

let middle = DerivePartialModel::new(input).unwrap();

assert_eq!(middle.entity, Some(format_ident!("Entity")));
assert_eq!(middle.entity, Some(parse_str::<Type>("Entity").unwrap()));
assert_eq!(middle.ident, format_ident!("PartialModel"));
assert_eq!(middle.fields.len(), 3);
assert_eq!(
Expand Down

0 comments on commit 620381c

Please sign in to comment.