MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_header_builder_with_timestamp

Function test_header_builder_with_timestamp

atomic-core/src/change/header.rs:544–555  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

542
543 #[test]
544 fn test_header_builder_with_timestamp() {
545 let ts = DateTime::parse_from_rfc3339("2024-01-15T10:30:00Z")
546 .unwrap()
547 .with_timezone(&Utc);
548
549 let header = ChangeHeader::builder()
550 .message("Test")
551 .timestamp(ts)
552 .build();
553
554 assert_eq!(header.timestamp, ts);
555 }
556
557 #[test]
558 fn test_header_try_build_success() {

Callers

nothing calls this directly

Calls 4

unwrapMethod · 0.45
buildMethod · 0.45
timestampMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected