Initial commit: Full Crawl API implementation
This commit is contained in:
18
crates/db/tests/db_test.rs
Normal file
18
crates/db/tests/db_test.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use shared::models::User;
|
||||
|
||||
#[test]
|
||||
fn test_user_model_serialization() {
|
||||
let user = User {
|
||||
id: uuid::Uuid::new_v4(),
|
||||
email: "test@example.com".to_string(),
|
||||
password_hash: Some("hash".to_string()),
|
||||
google_id: None,
|
||||
credits: 30,
|
||||
tier: "free".to_string(),
|
||||
created_at: chrono::Utc::now(),
|
||||
updated_at: chrono::Utc::now(),
|
||||
};
|
||||
|
||||
let json = serde_json::to_string(&user).unwrap();
|
||||
assert!(json.contains("test@example.com"));
|
||||
}
|
||||
Reference in New Issue
Block a user