Skip to content

Commit 2c26ad1

Browse files
committed
remove unit test for utcnow
1 parent 129a0e4 commit 2c26ad1

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

dsc_lib/src/functions/utc_now.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -96,28 +96,3 @@ fn convert_dotnet_format_to_chrono(format: &str) -> String {
9696

9797
converted_format
9898
}
99-
100-
#[cfg(test)]
101-
mod tests {
102-
use crate::configure::context::Context;
103-
use crate::parser::Statement;
104-
use serde_json::Value;
105-
106-
#[test]
107-
fn without_format() {
108-
let mut parser = Statement::new().unwrap();
109-
let mut context = Context::new();
110-
context.processing_parameter_defaults = true; // Simulate processing parameter defaults
111-
let result = parser.parse_and_execute("[utcNow()]", &context).unwrap();
112-
assert_eq!(result, Value::String(chrono::Utc::now().to_rfc3339()));
113-
}
114-
115-
#[test]
116-
fn with_format() {
117-
let mut parser = Statement::new().unwrap();
118-
let mut context = Context::new();
119-
context.processing_parameter_defaults = true; // Simulate processing parameter defaults
120-
let result = parser.parse_and_execute("[utcNow('yyyy-MM-dd')]", &context).unwrap();
121-
assert_eq!(result, Value::String(chrono::Utc::now().format("yyyy-MM-dd").to_string()));
122-
}
123-
}

0 commit comments

Comments
 (0)