Skip to content

Commit

Permalink
fix read_only_with_default test when only default features are enabled (
Browse files Browse the repository at this point in the history
#854)

Co-authored-by: chen.fengyuan <[email protected]>
  • Loading branch information
chenfengyuan and chen.fengyuan authored Jul 27, 2024
1 parent f72dda0 commit b22a58a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion poem-openapi/tests/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use poem_openapi::{
Enum, NewType, Object, OpenApi,
};
use serde_json::json;
use time::OffsetDateTime;

fn get_meta<T: Type>() -> MetaSchema {
let mut registry = Registry::new();
Expand Down Expand Up @@ -390,8 +389,10 @@ fn read_only() {
);
}

#[cfg(feature = "time")]
#[test]
fn read_only_with_default() {
use time::OffsetDateTime;
fn default_offset_datetime() -> OffsetDateTime {
OffsetDateTime::from_unix_timestamp(1694045893).unwrap()
}
Expand Down

0 comments on commit b22a58a

Please sign in to comment.